bgmulinari / B1SLayer

A lightweight SAP Business One Service Layer client for .NET
MIT License
136 stars 47 forks source link

B1S-ReplaceCollectionsOnPatch in true #25

Closed mruiz-GIEG closed 1 year ago

mruiz-GIEG commented 1 year ago

Good evening, how can I enable the B1S-ReplaceCollectionsOnPatch to true to execute the PatchStringAsync to be able to add banks in the business partners, in postman it works fine for me with this structure but with the ReplaceCollectionsOnPatch to true

{ "BPBankAccounts": [{ "InternalKey": 94, "Country": "NOR", "BankCode": "BDF", "AccountNo": "35451111", "IBAN": "USD" }, { "InternalKey": 95, "Country": "NOR", "BankCode": "BANPRO", "AccountNo": "232323", "IBAN": "USD"

         }]

}

mruiz-GIEG commented 1 year ago

https://1.1.0.1:50000/b1s/v1/BusinessPartners('PN001498')

add headers B1S-ReplaceCollectionsOnPatch=true

bgmulinari commented 1 year ago

Hi, @mruiz-GIEG.

You can simply configure your request with the extension method WithReplaceCollectionsOnPatch().

mruiz-GIEG commented 1 year ago

Hola,@mruiz-GIEG.

Simplemente puede configurar su solicitud con el método de extensión WithReplaceCollectionsOnPatch().

Thank you very much excellent work