web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
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

I have the same question (0)
  • Verified answer
    Vilmos Kintera Profile Picture
    46,149 on at

    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/

  • Mantas Vysniauskas Profile Picture
    on at

    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.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Basit Profile Picture

Basit 1

#1
GL-01081504-0 Profile Picture

GL-01081504-0 1

#1
Roya Profile Picture

Roya 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans