Skip to main content

Notifications

Microsoft Dynamics AX (Archived)

Picking list generation through x++

(0) ShareShare
ReportReport
Posted on by

Hi All,

I need to generate Picking list on the batch job automatically by selected query. Like add Shipping date range today..today+2

I found this example:

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

But on this example I can't specify what kind lines I want to add to the SO picking list.

I need filter Sales Lines by some ranges and add it to the Picking List.

Next day when Batch job will run and will find new lines by selected query ranges need to add to another picking list and so on.

Is there other example where I can specify which lines I want to see on the picking list?

*This post is locked for comments

  • RE: Picking list generation through x++

    Sorry, I tried to google, but all solutions was not that what I was looking for. And it was not showing this thread.

    Thanks for the reference to that post. It helped to me.

  • Verified answer
    Vilmos Kintera Profile Picture
    Vilmos Kintera 46,149 on at
    RE: Picking list generation through x++

    You can override the query with the chooseLinesQuery() method on the salesFormLetter. This question has been asked multiple times in the forum and there are answers too, try using Search on the top next time.

    community.dynamics.com/.../115256

    https://axwise.wordpress.com/2013/11/08/sales-line-filtering-to-post-custom-picking-list-in-ax-2012-using-x/

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Congratulations to the January Top 10 leaders!

Check out the January community rock stars...

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,111 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,934 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans