BeyondERP.Newsletter
Menu

Setup step on the Optimize location directive queries page · Warehouse management

Optimize location directive queries once, off-peak

Use this tool to convert location directive queries to the faster pattern.

Used by
Process engineer, Warehouse manager
Business process
Manage warehouse operations
Menu item
action:WHSLocDirActionQueryConverter
Setup steps
1 on this page

How this guide was checked

Checked in Dynamics 365
Version 10.0.49: the menu item, form, table and security, the page.
Recommended values
Based on Microsoft's documentation. A sound starting point to adjust to your own business requirements.
Tests
A ready-to-run test, “Optimize directives without changing results”, to confirm this setup in your own test environment.
Show what matters for
SETUP GUIDEHow to set it up8 sections. Choose a role to highlight what matters to you.
Everyone

1What it is and why

What it isA periodic task that finds location directive queries that use an older query pattern and converts them to the faster pattern that the current on-hand data model supports.
What you do hereUse this task to speed up location directive queries, preferably as a one-off run outside peak hours.
ExampleFor example, after upgrading BEAT to 10.0.49 the optimization advisor reports 42 location directives with the older query pattern; the tool is run once on Sunday evening in UAT, the directive tests pass, and then once in production.
Optimize location directive queries page in Dynamics 365
The page in Dynamics 365. page title tab to open what to set or check
Functional consultant · Solution architect

2Where it fits

Business processManage warehouse operations
Menu pathWarehouse management › Periodic tasks › Clean up › Optimize location directive queries
Set up firstLocation directives Microsoft Learn
Used next byProcess waves Microsoft Learn
Related pagesLocation directives Microsoft Learn
In this process Clean old ASN and packing structure data per module · Remove failed rewave lines on a schedule
End user · Functional consultant

3How to do it

About the examples: Examples and screenshots in this guide use BEAT, a demo company in a Dynamics 365 test environment. Use your own company's codes and values instead of copying them.

When to run it

When to run itWhen you run Supply Chain Management 10.0.35 or later and the optimization advisor reports that location directive queries can be optimized.
How oftenOnce, and again only when new location directives are created with the older query pattern; Microsoft recommends running it as needed rather than on a recurring schedule.
Batch settingsOne-time batch job at an off-peak time. Waving and work creation run slower while it runs, because the directives are locked and flushed from all application object servers.
What the output showsLocation directive queries that joined InventSum and InventDim are rewritten so all ranges sit on InventSum and the join is removed. Directive queries typically run 30 to 50 percent faster. A directive that now picks different locations points to a range that didn't convert as expected.

Source: Microsoft Learn

Setup steps on this page

Optimize location directive queries once, off-peak

Use this tool to convert location directive queries to the faster pattern.

Steps from Microsoft

  1. Go to Warehouse management > Periodic tasks > Clean up > Optimize location directive queries.
  2. Run the tool on a user acceptance testing environment first, and run your location directive acceptance tests there before you touch production.
  3. To convert only some directives, on Records to include select Filter and limit the query to those location directives.
  4. Schedule it as a one-time batch job at an off-peak time, for example Sunday evening, instead of a recurring schedule. The tool locks the location directives while it runs.
  5. After it finishes, run a test wave and check that work is still created at the expected pick locations.

Source: Microsoft Learn

Fields on the page

FieldWhat it meansExample
Records to includeSelect Filter to convert only some location directives.Microsoft Learn Directive code = PICK
Batch processingRun it as a one-time batch job at an off-peak time; the tool locks the directives while it runs.Microsoft Learn Yes, once

Common errors and fixes

MessageWhat to do
Waves and work creation slow down during the runThe tool locks location directives and flushes them from all AOS servers. Run it off-peak as a one-time batch job. Microsoft Learn

Test checklist

  1. All location directive acceptance tests still pass after the run.
  2. A test wave creates work at the same pick locations as before.
  3. The optimization advisor no longer reports the opportunity.

Source: Microsoft Learn

Functional consultant

4Setup decisions

Setup stepRecommended value and whyDecision, common mistake and test
Optimize location directive queries once, off-peakRun it once in UAT with your directive tests, then once in production on a Sunday evening.It locks the directives and flushes them from all AOS servers while it runs.How is the location directive optimization rolled out?Scheduling it as a recurring job during picking hours.Test: Optimize directives without changing results

Feature management and licence

Licence or add-inWarehouse management is part of the Dynamics 365 Supply Chain Management licence. In this system 2 roles can open this page, among them Warehouse manager and Process engineer.

Microsoft Learn

Solution architect

5Design impact

Shared or per companyPer company: location directives are set up per legal entity. Microsoft data model
Can it be undoneIrreversible: The queries are rewritten in place.
If you change it laterRunning the tool locks the location directives and flushes them from all application object servers, so wave processing and work creation run more slowly while it runs. Avoid peak hours. Microsoft Learn
Technical architect

6Technical

Menu itemaction:WHSLocDirActionQueryConverter Checked in Dynamics 365
Who can open it

2 security roles. Select a role to see its duties and privileges.

  • RoleProcess engineerRouteProcessEngineer
    • DutyMaintain warehouse operation masterWMSWarehouseOperationMasterMaintain
      • PrivilegeMaintain location directives dataWHSLocDirTableMaintain
  • RoleWarehouse managerWMSWarehouseManager
    • DutyMaintain warehouse operation masterWMSWarehouseOperationMasterMaintain
      • PrivilegeMaintain location directives dataWHSLocDirTableMaintain
Roles worked out from Microsoft's standard security setup and checked in a working Dynamics 365 system (version 10.0.49)
Roles to set it up and use itTo use itWarehouse manager WMSWarehouseManagerProcess engineer RouteProcessEngineerGive people one of these roles. On this system, 2 roles can run this page.Checked in Dynamics 365
Developer

7Developer

Open it by URLhttps://<your-environment>/?mi=action:WHSLocDirActionQueryConverter
Data migrationLoad order: Optimize location directive queries has no data entity in Data management, so it can't be loaded from a file or a configuration template. The tool rewrites queries already in the environment; load location directives, then run it once.Microsoft Learn
Everyone

8Sources

To cite this step: WM-JOB-270, Optimize location directive queries once, off-peak. Beyond ERP Atlas Hub. https://www.beyonderp.cloud/atlas/step/WM-JOB-270