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, “Delete purchase update history up to a date”, 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 cleanup job that permanently deletes purchase update history: the records that are created when purchase order confirmations, picking lists, product receipts and invoices are posted.
What you do here
Use it to remove old update history that the business has confirmed it no longer needs. Microsoft says to run cleanup routines only after that analysis, and to test each one in a test environment before production.
Example
For example, BEAT keeps 12 months of purchase update history. In January 2027 the IT manager deletes executed history created until 2025-12-31 for the company, after purchasing and finance have signed off that retention period and the same run was checked in a copy of production.
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 update history from posting purchase confirmations, picking lists, product receipts and invoices has grown and the business has confirmed the old entries are no longer required.
How often
On demand after the retention period is agreed, or as a recurring background job that uses Retain records based on age.
Batch settings
Run it in the background outside business hours when a large amount of history is deleted at once.
What the output shows
Update history that matches the Clean up status and is older than the date or age you set is deleted for good.
Which update history records to delete, by their status. Executed is the default.Checked in Dynamics 365
Executed
Created until
History created up to this date is deleted when Retain records based on age is No.Checked in Dynamics 365
2025-12-31
Retain records based on age
Yes/No option, No by default. With No, the job uses the Created until date and Maximum age can't be entered.Checked in Dynamics 365
No
Maximum age
The maximum age of the history to keep. It can be entered only when Retain records based on age is Yes.Checked in Dynamics 365
365
Common errors and fixes
Message
What to do
Update history of current orders is missing after the cleanup.
The Created until date or Maximum age was too recent. Deleted history can't be brought back; agree the retention period with the business and test the run in a test environment before production. Microsoft Learn
Test checklist
In a test environment, note two orders with update history: PO-001234 posted on 2025-06-30 and PO-002210 posted on 2026-10-01.
Run the cleanup with Clean up Executed and Created until 2025-12-31.
Check the update history of both orders.
Check that PO-001234 shows 0 history entries and PO-002210 still shows its entries.
Run it with Clean up set to Executed and a Created until date, or a Maximum age, that keeps the agreed retention period, after a test run in a test environment.The job deletes update history for good, and Microsoft says to run cleanup routines only after the business confirms the data is no longer required.
On the live system, only the Information technology manager role can run this page.
Checked in Dynamics 365
Solution architect
5Design impact
Shared or per company
Per company: it deletes the purchase update history of the legal entity you run it in. Checked in Dynamics 365
Can it be undone
Irreversible: Deleted update history can't be restored.
If you change it later
Deletes update history records of purchase confirmations, picking lists, product receipts and invoices. Run it only after the business confirms the data is no longer required. Microsoft Learn
Technical architect
6Technical
Menu item
action:PurchParmCleanUpChecked in Dynamics 365
Form
DialogChecked in Dynamics 365
Who can open it
1 security role. Select a role to see its duties and privileges.
DutyMaintain system settingsSysServerSettingsMaintain
PrivilegeClean up purchase update historyPurchParmCleanUpProcess
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 it
To use itInformation technology manager SysServerITManagerGive people one of these roles. On this system, 1 role can run this page.Checked in Dynamics 365
Load order: Purchase update history cleanup has no data entity in Data management. It deletes history and holds no data of its own; update history isn't migrated. Run it in the new system only after go-live, when the retention period is agreed.Checked in Dynamics 365