How to Create a Posted Shipment via Web Service and AL?
Hi everyone,
I am currently working on D365BC extension, I'm not sure how to trigger the "post" action to let the sales order becomes a shipment. Or we could directly create a shipment use web service. I want to do a function that create the shipment base on the sales order information. Does anyone know how to do that in AL and use Web Service?
I have tied to send a POST request to posted shipment web service , it always returns errors. We are not sure what is the required fields. Otherwise, is it possible to trigger the “post” action through the OData to post a Sales Order to create a posted shipment?
Thank you guys!
Long terms we are working on making bound actions accusable in v2. That will enable you to apply the same patterns as we have used for page 5475 Sales Invoice Entity
Meanwhile there are serval ways that you can do a post a shipment.
On way could be to create a new table with a structure like
Order No. Posted shipment no.
Expose this as an odata page or an API (yes you can do this now :-)
And if an entry with order no is insert the fire a post this order (as shipment) and end with updating the Posted shipment no.
Another way could be to expose a codeunit as soap and use this interface
Thank you for replying. Since our integration solution are use OData, so we create a new table and once we post a SO number, it will post this SO to Shipment in the oninsert trigger. Which is similar to the first method. Thank you so much.