AX2012 : X++ code to update picking list for sales order

Written in

by

Hi Friends,

Use the following code to generate the picking list for a sales order. This will give you the same results when you do Sales Order –> Pick and Pack –> Generate picking list.

static void SalesOrder_UpdatePickingList(Args _args)
{
    SalesFormLetter_PickingList salesFormLetter;
    SalesTable      salesTable = salesTable::find(\’SO-101292\’);

    ;
    salesFormLetter = SalesFormLetter_PickingList::newPickingList();
    salesFormLetter.transDate(systemDateGet());
    salesFormLetter.update(salesTable,
                            systemdateget(),
                            SalesUpdate::All,
                            AccountOrder::None,
                            NoYes::No,
                            NoYes::No);
}

Tags

Categories

12 responses to “AX2012 : X++ code to update picking list for sales order”

  1. Pradeep Avatar

    Good one Rachit

    Like

  2. Rudsen Avatar

    Normally you start all the updates with the construct method of the formletter like this one:salesFormLetter = SalesFormLetter::construct(DocumentStatus::PickingList);

    Like

  3. Anonymous Avatar
    Anonymous

    wat if there is a partial picking list??

    Like

  4. Rachit Garg Avatar

    In case of partial picking list you can update the deliver now qty before running the job and instead of SalesUpdate::All you can pass SalesUpdate::DeliverNow

    Like

  5. Sumit Bhagat Avatar

    Hi Rachit,How can I pass new Inventory Dimension like InventBatchId for picking list Item???

    Like

  6. Rachit Garg Avatar

    Hi Sumit, Can you please elaborate what do you want to achieve. Thanks!!

    Like

  7. Anonymous Avatar
    Anonymous

    How to get created pick list PickingRouteId?

    Like

  8. Sudhesh Dessai Avatar

    Hi Rachit ,I am using AX 2009 RU 6 and I want to automate below Sales Order Packing slip:1. SalesLine –> Inventory Reservation 2. Release sales order for picking. This divided into 2 sub step: 2. a) Activation of all physically reserved sales orders 2. b) Release for pick ( Picking List posting)3. Post Packing SlipI have automated the step 1 : Reservation ( i.e. I am able to reserve based on Inventory dimension like serial number or batch id ). But regarding step 2 I have below questions:1. Can I update Deliver Now QTY through code without following step 2. i.e. bypass step 2 ?2. How to post packing slip using x++?Regards Sudhesh Dessai

    Like

  9. Anonymous Avatar
    Anonymous

    Hi Rachit ,I am using AX 2009 RU 6 and I want to automate below Sales Order Packing slip:1. SalesLine –> Inventory Reservation 2. Release sales order for picking. This divided into 2 sub step: 2. a) Activation of all physically reserved sales orders 2. b) Release for pick ( Picking List posting)3. Post Packing SlipI have automated the step 1 : Reservation ( i.e. I am able to reserve based on Inventory dimension like serial number or batch id ). But regarding step 2 I have below questions:1. Can I update Deliver Now QTY through code without following step 2. i.e. bypass step 2 ?2. How to post packing slip using x++?Regards Sudhesh Dessai

    Like

  10. Pradeep Avatar

    hi buddy were you successful in doing this?

    Like

  11. Vishu Benawal Avatar

    This comment has been removed by the author.

    Like

  12. Vishu Benawal Avatar

    This comment has been removed by the author.

    Like

Leave a comment

Wait, does the nav block sit on the footer for this theme? That's bold.

Brewing thought

Explore world of Microsoft Dynamics 365

Explore the style variations available. Go to Styles > Browse styles.