Skip to main content

Notifications

Microsoft Dynamics AX (Archived)

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

Posted on by Microsoft Employee

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

 

 

*This post is locked for comments

  • ARPIT CHAVHAN Profile Picture
    ARPIT CHAVHAN 4,359 on at
    RE: Post packing slip using shipment through x++ in Dynamics AX 2012

    hi Charuhas ,

    My requirement is somehow similar to yours, 

    I have to post packing slip, shipment wise. Suppose in a load i have three lines with first two having same shipment and the last one with different shipment. then two packing slips should get generated.

    i.e.,  it should consolidate based on shipment id.

    Have you found any solution ?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

New! Quick response templatesâš¡

Save time with the new custom templates!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,228 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,056 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans