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:
How could I achieve that the picking list is created with my custom picking route ID?
Thanks in advance for any hints.
Sebastian
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.
André Arnaud de Cal...
292,111
Super User 2025 Season 1
Martin Dráb
230,934
Most Valuable Professional
nmaenpaa
101,156