BeyondERP.Newsletter
Menu

Setup step on the Purchase order history cleanup page · Procurement and sourcing

Delete old purchase order history

Keep purchase order history to the retention period the business agreed.

Used by
Information technology manager
Business process
Procure goods and services
Menu item
action:PurchOrderHistoryCleanUp
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, “Delete purchase order 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 isA cleanup job that permanently deletes purchase order history records created up to the date you enter in Created until. The dialog has no other selection.
What you do hereUse it to reduce stored purchase order history once the business has agreed how long that history must be kept. Treat it like the other cleanup routines: run it only after the business confirms the data is no longer required, and test it in a test environment first.
ExampleFor example, BEAT must keep purchase order history for 7 years. In March 2027 the IT manager enters Created until 2019-12-31 and runs the job in a copy of production, checks orders such as PO-000412 from 2019 and PO-003118 from 2024, and only then runs it in production.
Purchase order history cleanup 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 processProcure goods and services
Menu pathProcurement and sourcing › Periodic tasks › Clean up › Purchase order history cleanup
Set up firstFinalize purchase orders Microsoft Learn
Used next byAll purchase orders Microsoft Learn
Related pagesPurchase update history cleanup Microsoft Learn
In this process Delete old purchase update history · Delete old draft consignment replenishment order journals
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 old purchase order history is no longer needed for audits or vendor questions and the business has agreed the retention period.
How oftenOn demand, for example once a year after the retention period is confirmed.
Batch settingsRun it in the background outside business hours, because one run can process a large number of history records.
What the output showsPurchase order history created up to the Created until date is deleted for good.

Source: Microsoft Learn

Setup steps on this page

Delete old purchase order history

Keep purchase order history to the retention period the business agreed.

Steps from Microsoft

  1. Go to Procurement and sourcing > Periodic tasks > Clean up > Purchase order history cleanup.
  2. Agree with purchasing, finance and audit how many years of purchase order history must be kept.
  3. In Created until, enter the last creation date to delete; everything up to that date goes, because the job has no other filter.
  4. Try the run in a test environment with a copy of production and compare an old order and a recent order before and after.
  5. Run it in production outside business hours and keep the date you used with the change record.

Source: Microsoft Learn

Fields on the page

FieldWhat it meansExample
Created untilPurchase order history created up to this date is deleted. It is the only parameter of the job.Checked in Dynamics 3652019-12-31

Common errors and fixes

MessageWhat to do
History that auditors still need is gone after the run.The Created until date was too recent. Deleted history can't be restored; agree the retention period first and test the date in a test environment. Microsoft Learn

Test checklist

  1. In a test environment, pick PO-000412 created in 2019 and PO-003118 created in 2024 and note how much history each shows.
  2. Run the job with Created until 2019-12-31.
  3. Open both orders again.
  4. Check that PO-000412 shows 0 history records before 2020 and that PO-003118 shows the same history as before.

Source: Microsoft Learn

Functional consultant

4Setup decisions

Setup stepRecommended value and whyDecision, common mistake and test
Delete old purchase order historyRun it with a Created until date that keeps the full retention period agreed with finance and audit, after a test run in a test environment.The job has only one parameter, so the date alone decides what is deleted, and deleted history can't be restored.How long is purchase order history kept before the cleanup deletes it?Entering a recent date because the field looks like a filter on old orders: everything up to that date is deleted.Test: Delete purchase order history up to a date

Feature management and licence

Licence or add-inOn the live system, only the Information technology manager role can run this page.

Checked in Dynamics 365

Solution architect

5Design impact

Shared or per companyPer company: it deletes purchase order history of the legal entity you run it in. Every history record up to the Created until date is in scope. Checked in Dynamics 365
Can it be undoneIrreversible: Deleted purchase order history can't be restored.
If you change it laterOld purchase order history is deleted for good. As with every cleanup routine, run it only after the business confirms the data is no longer required, and test it in a test environment first. Microsoft Learn
Technical architect

6Technical

Menu itemaction:PurchOrderHistoryCleanUp Checked in Dynamics 365
FormSysOperationTemplateForm Checked in Dynamics 365
Who can open it

1 security role. Select a role to see its duties and privileges.

  • RoleInformation technology managerSysServerITManager
    • DutyMaintain system settingsSysServerSettingsMaintain
      • PrivilegeClean up purchase order historyPurchOrderHistoryCleanUpProcess
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 itInformation technology manager SysServerITManagerGive people one of these roles. On this system, 1 role can run this page.Checked in Dynamics 365
Developer

7Developer

Open it by URLhttps://<your-environment>/?mi=action:PurchOrderHistoryCleanUp
Data migrationLoad order: Purchase order history cleanup has no data entity in Data management. It deletes history and holds no data of its own. Run it in the new system only after go-live, once the retention period is agreed.Checked in Dynamics 365
Everyone

8Sources

To cite this step: PS-JOB-030, Delete old purchase order history. Beyond ERP Atlas Hub. https://www.beyonderp.cloud/atlas/step/PS-JOB-030