Creating an XDS Policy with performance in mind
You are here
Clean Up Your Journals!
Let's go over cleaning up our ledger journals.
Although we all like having lots of data available for us to look at and analyze, at some point it becomes deadweight or of so little value we don't need the details for how we got the transaction, we just need the result of the transaction. AX 2012 and Dynamics 365 for Finance and Supply Chain / Finance and Operations have functionality to help with this.
AX 2012
In General Ledger > Periodic > Clean up, look for Clean up Ledger Journals. This will let you clean up all kinds of journals. However, this has no date or days since X criteria so it will delete all posted journals by type regardless of when it was posted. Journals created with a voucher template will never be deleted by this procedure. If you use this, you'll want to run it in batch. Also, I would advise working with a developer to add a date range and filter on the posted date and time for the journals. This will give you more control over what gets deleted. It may be useful to have journals posted a year ago but not for journals posted 3 years ago. Also, this could be a yearly task included with your yearly closed executed after everything has been reconciled and closed.
A more technical explanation of how this works is that depending on the options you select, this will delete the records in the ledger journal table (LedgerJournalTable) skipping any business logic and delete actions. Next, this will delete journal lines (LedgerJournalTrans) from the deleted journal headers also skipping any business logic and delete actions. Finally, depending on the journal type, there may be extra info in other tables related to that journal. Those records are also deleted skipping business logic and delete actions. Finally, any document attachments for the journal lines are deleted again skipping business logic and delete actions.
Dynamics 365 For Finance and Supply Chain
General Ledger > Periodic, look for Clean up Ledger Journals. This does the same thing as the AX 2012 version functionally but looks a little different.