Keep work line history for the investigation period
Warehouse managementPeriodic tasksClean up
action:WHSTmpWorkLineHistoryPurge
Used by
System administrator
Business process
Manage warehouse operations
Menu item
action:WHSTmpWorkLineHistoryPurge
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, “Clean work line history”, 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 is
A periodic task that deletes temporary work history records.
What you do here
Use this task to delete temporary work history older than the number of days you choose to keep.
Example
For example, BEAT supervisors look back at work line changes for up to 60 days when a picking error is reported, so the job runs monthly with The number of days to keep = 60.
The page in Dynamics 365. page title tab to open what to set or check
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 it
When the temporary work line history has grown and the business has confirmed that work line history older than the retention period isn't needed.
How often
On demand, or on a regular schedule once the business has agreed a retention period for work line history.
Batch settings
Schedule it as a recurring background job outside warehouse peak hours, with the same number of days each time.
What the output shows
The temporary work line history records older than the number of days you entered are removed. If recent history disappears, the number of days was set too low.
Agree the look-back period for picking investigations (for example 60 days) and run the job monthly.Deleted history can't be restored; the default 0 removes everything.
Per company: the job deletes history of the legal entity it runs in. Microsoft data model
Can it be undone
Irreversible: Deleted work line history can't be restored.
If you change it later
Permanently deletes temporary work line history records older than the retention period. Microsoft Learn
Technical architect
6Technical
Menu item
action:WHSTmpWorkLineHistoryPurgeChecked in Dynamics 365
Who can open it
1 security role.
No privilege grants this menu item, so no duty or privilege can give access to it. Only the System administrator role, which is not limited by security, can open it.
RoleSystem administrator-SYSADMIN-
Worked out from Microsoft's standard security definitions (10.0.2790.108), which hold every privilege of the working Dynamics 365 system (10.0.49) but one custom privilege, checked on 2026-11-23
Load order: Work line history log cleanup has no data entity in Data management, so it can't be loaded from a file or a configuration template. The job only deletes old records; there is nothing to migrate. Set up the same recurring job in the new environment.Microsoft Learn
Checked in a working Dynamics 365 system, version 10.0.49: the menu item, form, table and security, the page.
To cite this step: WM-JOB-240, Keep work line history for the investigation period. Beyond ERP Atlas Hub. https://www.beyonderp.cloud/atlas/step/WM-JOB-240