Skip to main content

Notifications

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

  • Suggested answer
    Mohit Rampal Profile Picture
    Mohit Rampal 12,554 Super User 2024 Season 1 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

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

Product updates

Dynamics 365 release plans