Open EricWu91 opened 1 month ago
Hi, @EricWu91.
Yes, you can call WithReplaceCollectionsOnPatch
extension method in your request to add this header.
await serviceLayer
.Request("BusinessPartners", "C00001")
.WithReplaceCollectionsOnPatch()
.PatchAsync(yourObject);
Sweet! Sorry if it was obvious. Did I miss a doc pointing that out?
Not really, I'm yet to write a proper documentation for B1SLayer. I'll start that once 2.0 is out :)
Ok! If you need, I can help you with that. Just create an issue and mention me and I'll do what I can.
Sorry for the barrage of questions :)
As specified here (https://community.sap.com/t5/enterprise-resource-planning-q-a/service-layer-how-to-remove-all-addresses-of-a-business-partner/qaq-p/578058), whenever I want to clear the collections of a PATCH request (e.g. Business Partners' addresses), I'm required to provide a specific header: B1S-ReplaceCollectionsOnPatch=true
Is there a way to do that in SLConnection?