BeyondERP.Newsletter
Menu

Setup step on the Sales update history cleanup page · Retail and Commerce

Clean up sales update history

Delete old update history created when confirmations, picking lists, packing slips and invoices are posted.

See how to set it up Back to Retail and Commerce

Used by
Accounts receivable manager, Information technology manager, Rental coordinator agent and 4 more roles
Business process
Manage data
Menu item
SalesParmCleanUp
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, “Old history is removed”, 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 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, BEAT posts about 8,000 invoices a day from its stores and web shop. A nightly cleanup that keeps 30 days of update history stops the history tables from growing past a few hundred thousand rows.
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
Set up firstDelete sales orders Microsoft Learn
Used next byBatch jobs Microsoft Learn
Related pagesSales update history cleanup (Sales and marketing) Microsoft Learn Order events cleanup Microsoft Learn
In this process Clean up old production journals · Clean up ended production orders
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

Setup steps on this page

Clean up sales update history

Delete old update history created when confirmations, picking lists, packing slips and invoices are posted.

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

Common errors and fixes

MessageWhat to do
Posting gets slower over timeThe sales update history tables are large. Schedule this cleanup with a maximum age. 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

Functional consultant

4Setup decisions

Setup stepRecommended value and whyDecision, common mistake and test
Clean up sales update historySchedule it as a recurring batch job that keeps records based on age, for example the last 30 days.The history tables grow with every posting and slow down functions that query them.How much update history should be kept?Running it without a maximum age and deleting history that a posting in progress still needs.Test: Old history is removed

Feature management and licence

Licence or add-inIn this system 7 roles can open this page, among them Retail service, Sales manager, Information technology manager and Rental manager.

Checked in Dynamics 365

Solution architect

5Design impact

Shared or per companyPer company: each legal entity has its own records. Microsoft data model
Can it be undoneIrreversible: Deleted history can't be restored.
If you change it laterChoosing All also deletes waiting records, which are valid but not yet fully processed. Microsoft Learn
Technical architect

6Technical

Menu itemSalesParmCleanUp Checked in Dynamics 365
FormDialog Checked in Dynamics 365
Who can open it

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

  • RoleAccounts receivable managerCustInvoiceAccountsReceivableManager
    • DutyEnable quotation to sales order processSalesQuotationToSalesOrderProcessEnable
      • PrivilegeClean up sales update historySalesParmCleanUpProcess
  • RoleInformation technology managerSysServerITManager
    • DutyMaintain system settingsSysServerSettingsMaintain
      • PrivilegeClean up sales update historySalesParmCleanUpProcess
  • RoleRental coordinator agentRentalCoordinatorAgent
    • DutyEnable quotation to sales order processRentalSalesQuotationToSlsOrdProcessEnable
      • PrivilegeClean up sales update historySalesParmCleanUpProcess
  • RoleRental managerRentalManager
    • DutyEnable quotation to sales order processRentalSalesQuotationToSlsOrdProcessEnable
      • PrivilegeClean up sales update historySalesParmCleanUpProcess
  • RoleRental sales managerRentalSalesManager
    • DutyEnable quotation to sales order processRentalSalesQuotationToSlsOrdProcessEnable
      • PrivilegeClean up sales update historySalesParmCleanUpProcess
  • RoleRetail serviceRetailService
    • DutyEnable quotation to sales order processSalesQuotationToSalesOrderProcessEnable
      • PrivilegeClean up sales update historySalesParmCleanUpProcess
  • RoleSales managerTradeSalesManager
    • DutyEnable quotation to sales order processSalesQuotationToSalesOrderProcessEnable
      • PrivilegeClean up sales update historySalesParmCleanUpProcess
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 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

7Developer

Open it by URLhttps://<your-environment>/?mi=SalesParmCleanUp
Data migrationLoad order: Sales update history cleanup has no data entity in Data management, so it can't be loaded from a file or a configuration template. It works on data that is already in the system, so there is nothing to load.Checked in Dynamics 365
Everyone

8Sources