BeyondERP.Newsletter
Menu

Job page · Retail and Commerce

Sales update history cleanup

A periodic job that deletes old sales update history that is created when confirmations, picking lists, packing slips and invoices are posted.

Business process
Manage data
Menu item
SalesParmCleanUp
Show what matters for
PAGE GUIDEWhat the page does and how to use it7 sections. Choose a role to highlight what matters to you.
Everyone

1What it is and why

What it isA periodic job that deletes old sales update history that is created when confirmations, picking lists, packing slips and invoices are posted.
What you do hereUse this periodic task to keep sales posting fast by removing update history that is no longer needed.
ExampleFor example, decide how many days of posting history you must keep, and schedule the cleanup every three months, and at most every six months.
Sales update 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 processManage data
Menu pathRetail and Commerce › Retail and Commerce IT › Clean up › Sales update history cleanup
Related pagesDelete sales orders Microsoft Learn Order events cleanup Microsoft Learn
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 sales update history from confirmations, picking lists, packing slips and invoices has piled up and starts to slow down sales posting.
How oftenEvery three months, and at least every six months, as Microsoft recommends.
Batch settingsRun it as a recurring batch job with Retain records based on age set to Yes. Each run stops after two hours, so the first cleanup of a large backlog may take several runs.
What the output showsOld update history records are deleted, so the History on update page shows only recent records. If posting stays slow, the backlog may need more runs, or the Clean up choice may be keeping erroneous records.

Source: Microsoft Learn

Steps from Microsoft

  1. Go to Retail and Commerce > Retail and Commerce IT > Clean up > Sales update history cleanup.
  2. In the Clean up field, select Executed to delete only fully processed records, Executed and erroneous to also delete records with errors, or All to also delete waiting records that aren't fully processed yet.
  3. Set Retain records based on age to Yes for a recurring job, so the age is calculated on the day it runs; set it to No to delete records created before a fixed date.
  4. Enter the Maximum age in days (when the option is Yes) or the Created until date (when it is No).
  5. Schedule it on the Run in the background FastTab, then check the batch job history: one run lasts at most two hours, so a large backlog can need several runs.
  6. Post a sales confirmation or invoice afterwards and check that posting is as fast as expected.

Source: Microsoft Learn

Fields on the page

FieldWhat it means
Clean upThe type of records to delete: Executed, Executed and erroneous, or All.Microsoft Learn
Retain records based on ageYes deletes records by age on the day the job runs; No deletes records created before a fixed date.Microsoft Learn
Created untilRecords created before this date are deleted.Microsoft Learn
Maximum ageThe age in days of the records to keep; older records are deleted.Microsoft Learn

Test checklist

  1. No update history older than the maximum age remains for the chosen Clean up type.
  2. Waiting records are still there unless you chose All.
  3. The batch job finished without errors.

Source: Microsoft Learn

Solution architect

4Design impact

Can it be undoneNo: Deleted update history can't be restored. Choose All only if you also want waiting records deleted. Microsoft Learn
If you change it laterChoosing All also deletes waiting records, which are valid but not yet fully processed. Microsoft Learn
Technical architect

5Technical

Menu itemSalesParmCleanUp Checked in Dynamics 365
FormDialog Checked in Dynamics 365
Roles to set it up and use itTo use itRetail service RetailServiceSales manager TradeSalesManagerInformation technology manager SysServerITManagerRental manager RentalManagerRental coordinator agent RentalCoordinatorAgentGive people one of these roles. On this system, 7 roles can run this page.Checked in Dynamics 365
Developer

6Developer

Open it by URLhttps://<your-environment>/?mi=SalesParmCleanUp
Everyone

7Sources