SETUP GUIDEHow to set it up8 sections. Choose a role to highlight what matters to you.
Everyone
1What it is and why
What it is
A periodic job that deletes only the batch job history entries that match filters such as status, job description, company or user.
What you do here
Use this periodic task only when specific history entries must be deleted.
Example
For example, one recurring BEAT job writes thousands of history entries a day; the administrator runs the custom clean-up filtered on that job's description, with Records to delete in a transaction set to 10 because the job keeps a large information log.
The page in Dynamics 365. page title tab to open what to set or check
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 it
Only when specific batch job history entries must be deleted, for example the history of one noisy recurring job.
How often
On demand, when a targeted cleanup is needed; use the standard Batch job history clean-up for routine removal.
Batch settings
Run it in the background outside business hours, one custom cleanup at a time.
What the output shows
Batch job history that matches your filter and is older than the history limit is deleted; everything else stays. If too much was deleted, the filter under Records to include was too broad.
Delete only the history entries of selected jobs, users, companies or statuses.
Steps from Microsoft
Go to System administration > Periodic tasks > Batch job history clean-up (custom) (the menu label ends with a period).
In History limit (days), enter how many days of the matching history to keep.
In Records to delete in a transaction, enter a value from 10 to 100. Use a smaller number when the jobs carry large parameters or information logs, so other jobs aren't blocked.
Under Records to include, filter on status, job description, company or user, and add other fields with Filter.
When you need several cleanups with different criteria, run them one after another, never at the same time.
Afterwards, confirm that only history matching your filter was removed and that other jobs' history is untouched.
Use it only when specific entries must go, with a filter under Records to include and 10 to 100 records per transactionLearn: the custom version is for specific entries; smaller transactions avoid blocking other jobs, and runs with different criteria must follow one another.
Shared table, filtered run: the batch job history table has no company key, so the run deletes matching history across companies unless you filter on company. Microsoft data model
Can it be undone
No: Deleted history can't be restored.
If you change it later
Run several custom cleanups one after another, never at the same time, to avoid deadlocks. Microsoft Learn
Technical architect
6Technical
Menu item
action:BatchJobHistoryCleanupChecked in Dynamics 365
Load order: Batch job history clean-up (custom) has no data entity in Data management, so it can't be loaded from a file or a configuration template. It is a periodic job; run it again in each environment when needed.Checked in Dynamics 365
Checked in a working Dynamics 365 system, version 10.0.49: the menu item, form, table and security, the page.
To cite this step: SA-JOB-825, Run a targeted batch job history clean-up. Beyond ERP Atlas Hub, 2026-11-11. https://www.beyonderp.cloud/atlas/step/SA-JOB-825