BeyondERP.Newsletter
Menu

Setup step on the Purge commerce sales transactions page · Retail and Commerce

Purge old Commerce sales transactions

Delete store transaction data in a date range, regardless of posting status.

See how to set it up Back to Retail and Commerce

Used by
Information technology manager
Business process
Post store end-of-day financial statements in Dynamics 365 Commerce
Menu item
RetailEodPurgeTransactions
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, “A date range is purged”, 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 dialog that runs a batch job to delete old Commerce sales transaction data that is no longer needed.
What you do hereUse this page to delete transactions in a chosen date range, regardless of posting status, to reduce data costs and keep the system performing well.
ExampleFor example, if the current year is 2024, you can purge transactions dated 2022 or earlier, up to six months at a time.
Purge commerce sales transactions 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

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 Commerce sales transactions are no longer needed, to reduce data costs and keep the system fast; archive them first if you must keep a copy.
How oftenOn demand, one six-month range at a time.
Batch settingsIt always runs as a batch job, one active job per legal entity. It doesn't lock the tables, so other processes keep running.
What the output showsTransactions in the date range, with their statement and posting records, are deleted regardless of posting status. The job's information log lists each purged table and its record count; a low count means few transactions were left in that range.

Source: Microsoft Learn

Setup steps on this page

Purge old Commerce sales transactions

Delete store transaction data in a date range, regardless of posting status.

Steps from Microsoft

  1. Go to Retail and Commerce > Retail and Commerce IT > Clean up > Purge commerce sales transactions.
  2. Under Parameters, enter the From date and To date: at most six months, and both dates before the previous calendar year (in 2024, for example, only 2022 or earlier).
  3. Select Only delete logs and error files if you only want to delete the statement logs and transaction error files (RetailEodStatementControllerLog, RetailEodStatementEventLog and RetailEodTransactionError) and keep the transactions.
  4. Make sure you have the Information technology officer role and that no other purge job is active for the legal entity; only one can run at a time.
  5. Run it, then open the information log of the batch job to see which tables were purged and how many records were deleted.

Source: Microsoft Learn

Fields on the page

FieldWhat it means
Date rangeThe start and end dates of the transactions to delete; at most six months, and both dates before the previous calendar year.Microsoft Learn
Only delete logs and error filesWhen selected, only the statement log and transaction error files are deleted, not the transactions.Microsoft Learn

Common errors and fixes

MessageWhat to do
The date range is rejectedThe range can be at most six months, and both dates must be before the previous calendar year. Microsoft Learn

Test checklist

  1. The information log lists the purged tables and record counts.
  2. No store transactions remain in the purged date range.
  3. Transactions outside the range are unchanged.

Source: Microsoft Learn

Functional consultant

4Setup decisions

Setup stepRecommended value and whyDecision, common mistake and test
Purge old Commerce sales transactionsArchive posted transactions first if you must keep them, then purge six months at a time, oldest first.Purged transactions can't be recovered; the archive keeps a copy.Archive before purging?Purging without archiving and losing transactions an audit asks for.Test: A date range is purged

Feature management and licence

Licence or add-inAvailable by default from Commerce 10.0.47; in 10.0.42 to 10.0.46 Microsoft support had to turn it on. Only users with the Information technology officer role can run it.

Microsoft Learn

Solution architect

5Design impact

Shared or per companyPer legal entity: each legal entity can have only one active purge job. Microsoft Learn
Can it be undoneIrreversible: Deleted transactions can't be recovered.
If you change it laterDeleted transactions cannot be recovered, so only users with the Information technology officer role can run the purge. The job does not lock tables, so other processes keep running. Microsoft Learn
Technical architect

6Technical

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

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

  • RoleInformation technology managerSysServerITManager
    • DutyRetailEodPurgeTransactions
      • PrivilegePurge commerce sales transactionsRetailEodPurgeTransactions
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=RetailEodPurgeTransactions
Data migrationLoad order: Purge commerce sales transactions 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

To cite this step: RC-ITJ-210, Purge old Commerce sales transactions. Beyond ERP Atlas Hub. https://www.beyonderp.cloud/atlas/step/RC-ITJ-210