I am trying to post packing slip using x++ for a shipment. The shipment contains multiple order.
I referenced the code from the internet. But it is not working. May be some of the methods are depreciated in D365.
Has anybody posted the packing slip through code in D365? Please help.
My code: -
SalesFormLetter salesFormLetter; Set wmsShipmentSet = new Set(Types::String); ; wmsShipmentSet.add(shipmentTable.ShipmentId);
salesFormLetter = SalesFormLetter_PackingSlip::newFromWMSShipment(wmsShipmentSet); salesformletter.parmshipmentid(shipmenttable.shipmentid); salesformletter.parmlineidset(wmsshipmentset.pack()); salesFormLetter.update(shipmentTable, systemDateGet(), SalesUpdate::All,AccountOrder::None,false,false);
Hi Anurag Nagarkoti!
Take a look at this discussion. It's for AX2012, but maybe it will be helpful.
Business Applications communities