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

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Posting picking list for selected saleslines through code

(0) ShareShare
ReportReport
Posted on by 200

How create  picking list(from code), but not for whole SalesOrder, but only for selected lines , e.g. with any checkbox marked.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Florian Hopfner Profile Picture
    2,457 on at
    RE: Posting picking list for selected saleslines through code

    See How to post picking list for a group of sales orders? for code to post a picking list. One way to do this for only selected lines is to change the query so it only includes the selected lines.

  • Verified answer
    Piotr_Kulakowski Profile Picture
    200 on at
    RE: Posting picking list for selected saleslines through code

    Thanks for answer. But there is no salesFormLetter.createParmUpdate() method in AX2012.

    Do you have any idea?

  • Verified answer
    Florian Hopfner Profile Picture
    2,457 on at
    RE: Posting picking list for selected saleslines through code

    Take a look at method createParmUpdateFromParmUpdateRecord of the SalesFormLetter framework.

  • Piotr_Kulakowski Profile Picture
    200 on at
    RE: Posting picking list for selected saleslines through code

    Thanks, I found other solution:

    static void autoGenLP(SalesId salesId)

    {

       SalesFormLetter_PickingList salesFormLetter;

       SalesTable      salesTable = salesTable::find(salesId);

       QueryRun queryRun;

       Query query;

       ;

       if (! salesId)

       {

           throw error("@SYS25407");

       }

       try

       {

           salesFormLetter = SalesFormLetter_PickingList::newPickingList();

           query = new Query(QueryStr(SalesUpdate_bon));

           query.dataSourceTable(tablenum(SalesTable)).addRange(fieldnum(SalesTable, SalesId)).value(salesId);

           query.dataSourceTable(tablenum(InventLocation)).addRange(fieldnum(InventLocation, AutoGenLP_bon)).value(queryValue(NoYes::Yes));

           queryRun = new QueryRun(query);

           salesFormLetter.chooseLinesQuery(queryRun);

           salesFormLetter.transDate(systemDateGet());

           salesFormLetter.update(salesTable,

                                   systemdateget(),

                                   SalesUpdate::All,

                                   AccountOrder::None,

                                   NoYes::No,

                                   NoYes::No);

          // info(strfmt(" ", salestable.SalesId));

       }

       catch

       {

           info('');

       }

    }

  • Daljit Kaur Rahsi Profile Picture
    1,260 on at
    RE: Posting picking list for selected saleslines through code

    Hi Piotr,

    With the above mentioned code are you able to perform the printing of picking list just with a click of the button?

    Or did you make any changes in the code, please confirm.

  • In AX2012 in the InventOnHandItemListPage I need to be able to f Profile Picture
    499 on at
    RE: Posting picking list for selected saleslines through code

    Dear Piotr_Kulakowski

    Please find the attachments below

    1.

    SalesParamLine.png

    2.

    SalesParamLine.png

    1st Image shows the salesline selected, 2nd Image shows corresponding Packing Slip for sales line , 

    My Requirement is if i select any of the particular salesline (Through Check box),i need only selected lines of Saleline to appear in Picking list Form (Form Name:SalesEditLines),

    In (SalesEditLines Form), the (datasource Salesparamline) has (Join Source Property as SalesParmTable) , and the tables Salesline and SalesParamLine has a relation as SalesParmLine.SalesLineRecId == SalesLine.RecId. 

    with above said properties and relations ,

    Please help me on my Requirement to get only selected lines of salesline  in SalesParamLine.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Community Member Profile Picture

Community Member 4

#1
Martin Tocauer Profile Picture

Martin Tocauer 4

#3
Nayyar Siddiqi Profile Picture

Nayyar Siddiqi 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans