BeyondERP.Newsletter
Menu

Job page · Retail and Commerce

Purge commerce sales transactions

A periodic dialog that runs a batch job to delete old Commerce sales transaction data that is no longer needed.

Business process
Post store end-of-day financial statements in Dynamics 365 Commerce
Menu item
RetailEodPurgeTransactions
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 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

Business processManage sales orders › Manage store operations › Post store end-of-day financial statements in Dynamics 365 Commerce
Menu pathRetail and Commerce › Retail and Commerce IT › Clean up › Purge commerce sales transactions
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

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

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

Solution architect

4Design impact

Can it be undoneNo: Deleted transactions can't be recovered. Use Archive Commerce transactions instead if you need to keep posted transactions. Microsoft Learn
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

5Technical

Menu itemRetailEodPurgeTransactions Checked in Dynamics 365
FormDialog Checked in Dynamics 365
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

6Developer

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

7Sources