AL icon indicating copy to clipboard operation
AL copied to clipboard

How to Create a Posted Shipment via Web Service and AL?

Open RuiningFan opened this issue 8 years ago • 2 comments

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!

RuiningFan avatar Aug 07 '18 09:08 RuiningFan

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

AndersLarsenMicrosoft avatar Aug 14 '18 10:08 AndersLarsenMicrosoft

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.

RuiningFan avatar Aug 20 '18 02:08 RuiningFan