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

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);
}

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

  1. Pradeep says:

    Good one Rachit

    Like

  2. Rudsen says:

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

    Like

  3. Anonymous says:

    wat if there is a partial picking list??

    Like

  4. Rachit Garg says:

    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 says:

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

    Like

  6. Rachit Garg says:

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

    Like

  7. Anonymous says:

    How to get created pick list PickingRouteId?

    Like

  8. 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 says:

    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 says:

    hi buddy were you successful in doing this?

    Like

  11. This comment has been removed by the author.

    Like

  12. This comment has been removed by the author.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

A WordPress.com Website.
%d bloggers like this: