Saturday, February 9, 2019

Close a Sales Order via Web Services

To close a Sales Order via Web Services, instead of changing the orderStatus to _closed, user can set the isClosed field on each of the sales order line item to True.

The same procedure is used on a User Event Script, if user wants to close a Sales Order, it should also be the same for Web Services.

Here's the sample Web Service request for closing a sales order via Web Services. Note that the 'line' field specifies the line number of the item as seen in the User Interface (always starts with 1). 

<soapenv:Body>
<platformMsgs:update>
<platformMsgs:record xsi:type="s0:SalesOrder" internalId="6177">
<s0:itemList>
<s0:item>
<s0:isClosed>true</s0:isClosed>
<s0:line>1</s0:line>
</s0:item>
</s0:itemList>
</platformMsgs:record>
</platformMsgs:update>
</soapenv:Body>  

No comments:

Post a Comment