Skip to Content
Jul 25, 2022 at 06:47 AM

SalesOrder Patch for multiple items

60 Views Last edit Jul 26, 2022 at 07:28 AM 4 rev


we have the following szenario:

We have order nr. 123 with 3 items that we want to cancle as a whole and we want to set the Rejection Reason in the field "SalesDocumentRjcnReason".

For that we want to call the Patch API : \A_SalesOrderItem(SalesOrder='123',SalesorderItem='10) 3 times, alternating the itemID´s. SalesDocumentRjcnReason is not part of the SalesOrderHeader API so we go for the SalesOrderItem.

Unfortunetly after the first call, the others will fail with a bad request.

So is there any way to cancle a whole order and set the SalesDocumentRjcnReason?