Quantcast
Viewing all articles
Browse latest Browse all 73760

Post packing slip using shipment through x++ in Dynamics AX 2012

Hello,

I am trying to post a single packing slip for multiple sales orders through code using wmsshipment.

If I only use this line of code:

     SalesFormLetter.update(wmsShipment,systemDateGet(), SalesUpdate::DeliverNow, AccountOrder::Account);

Instead of posting packing slip for one specified shipment, it includes lines from all sales orders that are ready to to pack slip posted.


But if I do this:

    Set shipmentsToPostSet = new Set(Types::String);   
    WMSShipment wmsShipment = WMSShipment::find('SHP0000034');

    shipmentsToPostSet.add(wmsShipment.shipmentId);   
    salesFormLetter.parmLineIdSet(shipmentsToPostSet.pack());   
    SalesFormLetter.update(wmsShipment,systemDateGet(), SalesUpdate::DeliverNow, AccountOrder::Account);

It posts packing slips only for sales orders associated with the shipment but creates separate packing slips for each sales order.

I want to get it to consolidate the packing slip.

Can anybody please help with this issue if you have any information?

Thanks,

Charu Jadhav

 

 


Viewing all articles
Browse latest Browse all 73760

Trending Articles