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 :
Finance | Project Operations, Human Resources, ...
Suggested Answer

SalesFormLetter - Create / post a picking list by code with a given picking route ID

(0) ShareShare
ReportReport
Posted on by 1,650

Hello,

I'm able to create / post a picking list using the SalesFormLetter class with DocumentStatus::PickingList. I would like to give the posting a custom picking route ID, wich will be used as WMSPickingRoute.pickingRouteID (the number is created outside from D365) and all corresponding fields in the related tables, which are created during the posting process (e.g.: WMSOrderTrans.RouteId, WMSPickingRouteLink.PickingRouteID). I did not find any option in the salsFormLetter class to force a certain picking route ID. If I set the corresponding number sequence to manual the picking is created without a picking route ID (WMSPickingRoute.pickingRouteID = '').

As far as I analysed the code the ID is set here:

2023_2D00_04_2D00_03_5F00_14_2D00_13_2D00_01.jpg

How could I achieve that the picking list is created with my custom picking route ID?

Thanks in advance for any hints.

Sebastian

I have the same question (0)
  • Suggested answer
    Mohit Rampal Profile Picture
    12,565 Moderator on at
    RE: SalesFormLetter - Create / post a picking list by code with a given picking route ID

    Hi Sebastian, You can create Coc of initJournalHeader method, manipulate checkIfWMSOrder method call by setting isWMSOrderCalculated to false so you can pass standard logic of checkIfWMSOrder method.

    When next statement will call standard initJournalHeader method, it will not execute any step within the method due to return statement. Then you can write you custom logic to execute along with the standard code.

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 683 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 563 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 398 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans