D365 – Skip Transportation management and save 100ms

In my chase for millisecounds, here are a small one. If you are not using the TMS – Transportation Management module, but are using the WMS, then there are some costly validations on the sales order header. There is a hardcoded x++ parameter you can extend to prevent some heavy queries. The effect is that the following menu items is “deactivated”:

The query code you are skipping is a quite heavy 100 ms select with a join between WHSLoadTable and WHSWorkTable. In my world, 100ms is a lot for a query, and it is executed each time you select a sales order.

As seen, you need to create a small extension to the class TMSGlobal::skipTMS(). The forms/tables using this check is the following:

I would hope that instead of a hard-coded extension, Microsoft could make a parameter instead.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.