Accounting manager, Accounting supervisor, Rental manager and 2 more roles
Business process
Close periods
Menu item
Action:LedgerJournalCleanUp
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, “Cleanup deletes only posted journals in range”, 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 is
A cleanup routine that deletes posted General ledger, Accounts receivable, and Accounts payable journals.
What you do here
Use this page to remove posted ledger journals, and the information related to their original transactions, when reversing them won't be needed.
Example
For example, BEAT keeps posted journal history for ten years. In 2026 the accounting manager runs the cleanup in a copy of production first for posted General ledger journals dated 1 January to 31 December 2015, checks the result, and then runs it in production in batch.
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 for posted journals you are sure you will never need to reverse.
How often
Rarely, as part of data housekeeping; there's no fixed cadence.
Batch settings
Run it as a batch job, and turn on Delete journals batch process performance improvement in Feature management (10.0.47 and later) so it runs more efficiently.
What the output shows
The posted General ledger, Accounts receivable and Accounts payable journals in the date range are deleted, together with all information related to their original transactions.
Delete posted journals and their reversal information when they will never be reversed.
Steps from Microsoft
Go to General ledger > Periodic tasks > Clean up ledger journals.
Under Date range, enter the From date and To date of the posted journals to delete.
Expand General ledger, Accounts receivable and Accounts payable and set the options for each area, so only the journal types you mean are deleted.
Under Run in the background, run it as a batch job; with the Delete journals batch process performance improvement feature (10.0.47 and later) it uses a top picking pattern.
Afterwards, open the journal lists for the date range and check that only the posted journals you meant to remove are gone.
The date range of the posted journals to delete.Checked in Dynamics 365
Common errors and fixes
Message
What to do
A transaction can't be reversed after the cleanup
Deleting a posted journal removes the information related to the original transaction. Run the cleanup only for journals you will never reverse; post a manual correcting entry instead. Microsoft Learn
Test checklist
Only posted journals in the date range were deleted.
Unposted journals in the range are still there.
The batch job history shows the run ended without errors.
Run it rarely, for date ranges outside your retention period, after a test in a copy of production, as a batch job.The cleanup removes the information needed to reverse the original transactions, and it can't be undone.
Delete journals batch process performance improvement (Optional, 10.0.47 and later)
Licence or add-in
In this system 5 roles can run this page, among them Accounting manager, Accounting supervisor, Rental manager and Rental sales manager. Turn on Delete journals batch process performance improvement (10.0.47 and later) for large runs. Give the privilege only to the people who run data housekeeping.
Per company: the cleanup deletes posted journals of the legal entity it runs in. Microsoft Learn
Can it be undone
Irreversible: Deleted journals can't be restored.
If you change it later
Deleting a posted journal removes all the information related to the original transaction, so run it only when reversing those transactions won't be needed. Microsoft Learn
Technical architect
6Technical
Menu item
Action:LedgerJournalCleanUpChecked in Dynamics 365
Form
DialogChecked in Dynamics 365
Who can open it
5 security roles. Select a role to see its duties and privileges.
RoleAccounting managerLedgerAccountingManager
DutyEnable general ledger processLedgerGeneralLedgerProcessEnable
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 it
To use itAccounting manager LedgerAccountingManagerAccounting supervisor LedgerAccountingSupervisorRental manager RentalManagerRental sales manager RentalSalesManagerRental purchasing manager RentalPurchasingManagerGive people one of these roles. On this system, 5 roles can run this page.Checked in Dynamics 365
Load order: Clean up ledger journals has no data entity in Data management, so it can't be loaded from a file or a configuration template. It deletes data; there's nothing to load.Checked in Dynamics 365