Search code examples
axaptadynamics-ax-2009x++

How to post picking list for a group of sales orders?


I have a custom table with a list of sales orders I want to post picking lists for.

How can I pass them all at once to the SalesFormLetter object to pick them in a group?

I see SalesFormLetter_PickingList\newJournalList is being called, and I was wondering if there was a way I could just pass a simple RecordSortedList in of the sales orders I wanted to pick. That list is of the wrong table though...so that wouldn't work. It looks like I can somehow pass a query but I'm not exactly sure how to do that. Here is the basic code I'm using to post the picking lists:

salesFormLetter = SalesFormLetter::construct(DocumentStatus::PickingList);
salesFormLetter.update(SalesTable::find(_salesId), today(), SalesUpdate::All, AccountOrder::None, NoYes::No, NoYes::Yes);

Solution

  • This involves setting up a query to select your sales orders then calling the chooseLines to select the orders.