It is always recommended to clean up the old and ununsed data for better performance of the system. Given below the list of clean up jobs in D365FO system.
These cleanup routines should be run only after the business has done detailed analysis and confirmed that the data is no longer required.
Always test each cleanup routine in a test environment before you run it in a production environment.
System administration > Periodic tasks > Notification clean up
Delete records from the EventInbox and EventInboxData tables
System administration > Periodic tasks > Batch job history clean-up
Clean all history entries that are older than a specified number of days. Any entry that was created earlier is deleted from the BatchJobHistory table, and also from linked tables that have related records (BatchHistory and BatchConstraintsHistory). This version has improved performance optimization, because it doesn’t have to run any filtering.
System administration > Periodic tasks > Batch job history clean-up (custom)
Used only when specific entries must be deleted. You can clean up selected types of batch job history records, based on criteria such as status, job description, company, or user.
System administration > Periodic tasks > Batch job clean-up
Clean up the batch job table. In Retain jobs (days) field, specify the number of days to keep the records of batch jobs. This cleanup should be done outside business hours.
System administration > Inquiries > Database > Database Log > Clean up log
Deletes the database logs as you require. Users can delete logs for specific tables, delete specific types of database logs, or delete logs based on the date and time when they were created.
Data Management -> Job history cleanup.
By default, job history entries and related staging table data that are older than 90 days are automatically deleted (starting September 2023). To configure a job history retention period of less than 90 days, use the Execution history cleanup feature in Data management.
The following tables are cleaned up:
General ledger > Periodic tasks > Clean up ledger journals
Deletes General ledger, Accounts receivable, and Accounts payable journals that have been posted. When you delete a posted ledger journal, all information that is related to the original transaction is removed.
Retail and Commerce > Retail and Commerce IT > Email and notifications > Clean up email notification logs
Clean up the email notification logs
Sales and marketing > Periodic tasks > Clean up > Delete sales orders
Sales and marketing > Periodic tasks > Clean up > Delete quotations
Sales and marketing > Periodic tasks > Clean up > Delete return orders
Sales and marketing > Periodic tasks > Clean up > Sales update history cleanup
Deletes old update history transactions. All updates of confirmations, picking lists, packing slips, and invoices generate update history transactions. You can view these transactions on the History on update page.
Sales and marketing > Periodic tasks > Clean up > Order events cleanup
Procurement and sourcing > Periodic tasks > Clean up > Purchase update history cleanup
Delete all updates of confirmations, picking lists, product receipts, and invoices that generate update history transactions.
Procurement and sourcing > Periodic tasks > Clean up > Delete requests for quotations
Delete requests for quotation (RFQs) and RFQ replies. The corresponding RFQ journals aren’t deleted but remain in the system.
Procurement and sourcing > Periodic tasks > Clean up > Draft consignment replenishment order journal cleanup
This cleanup routine is used to clean up draft consignment replenishment order journals.
Inventory management > Periodic tasks > Clean up
Inventory journals cleanup – deletes posted inventory journals. Cleaning up posted inventory journals can help free system resources.
Inventory settlements cleanup– This cleanup routine groups closed inventory transactions or deletes canceled inventory settlements. By cleaning up closed or deleted inventory settlements, you can help free up system resources.
Inventory dimensions cleanup-This cleanup routine maintains the InventDim
table. It deletes all existing inventory dimensions that are defined but not used in the current company. All unused inventory dimensions are permanently deleted regardless of whether the transaction is open or closed.
This cleanup routine verifies whether each InventDim
record is being used in any purchase order lines, sales order lines, inventory transactions, and/or on-hand inventory records. If a reference exists to InventDim
, it’s checked. If it’s not used, it’s deleted. If the same combination of dimensions is used later, the system creates a new InventDim
record with a new InventDimId
value and uses this instead.
Inventory dimension combination records that are still referenced can’t be deleted because when an InventDim
record is deleted, related transactions can’t be reopened.
On-hand entries cleanup
This cleanup routine deletes closed and unused entries for on-hand inventory that is assigned to one or more tracking dimensions. Closed transactions are marked as closed and contain a value of 0 (zero) for all quantities and cost values. By deleting these transactions, you can help improve the performance of queries for on-hand inventory. Transactions won’t be deleted for on-hand inventory that isn’t assigned to tracking dimensions.
Warehouse management on-hand cleanup
This cleanup routine deletes records in the InventSum
and WHSInventReserve
tables. These tables are used to store on-hand information for items that are enabled for warehouse management processes (that is, WHS items). By cleaning up these records, you can significantly improve the performance of on-hand calculations.
On-hand entries aggregation by financial dimensions
This cleanup routine aggregates InventSum
rows that have a quantity of 0 (zero) and cleans up records where Closed is set to True.
This routine handles scenarios where there are no more quantities in the InventSum
table for a combination of inventory dimensions, but there’s still a value. Although these values disappear in some cases, the current design occasionally allows values to remain.
Transfer order update history cleanup:
This cleanup routine deletes records from the InventTransferParmTable
, InventTransferParmUpdate
and InventTransferParmLine
tables. These tables are used when posting transfer orders. This cleanup can help improve the performance of any function that queries these tables.
Inventory transaction consolidation
This cleanup routine consolidates data about inventory transactions to help improve system performance.
Inventory on-hand report data clean up
This cleanup routine deletes on-hand storage data for reports that were executed before a specific date
Correct inventory transfer order lines manually
ixes inconsistent data and corrects unexpected quantities that are related to transfer orders.
Inventory journal data correction
Deletes all on-order or ordered inventory transactions that link to posted or nonexistent inventory journals in the current company. Users can choose whether or not to clean up orphan unposted inventory transactions without journal lines.
Production control > Periodic tasks > Clean up > Production journals cleanup
Delete unused journals.
Production control > Periodic tasks > Clean up > Production orders cleanup and
Cost management > Manufacturing accounting > Clean up > Production orders cleanup
Delete production orders that are ended.
Production control > Periodic tasks > Clean up > Clean up registrations
Clean up registrations. This cleanup routine deletes only data that has been processed.
Production control > Periodic tasks > Clean up > Archive future registrations
Remove future registrations from the raw registrations table.
Cost management > Manufacturing accounting > Clean up > Clean up the costing sheet cache
The CostSheetCache table is used as a temp location for cost sheets to help generate prices. This job cleans up the costing sheet cache. Records in the cache that have an age of the specified days or older are deleted.
Master planning > Master planning > Maintain plans > Plan version cleanup
Usually, this cleanup is done automatically. However, automatic cleanup sometimes malfunctions, and orphan data remains in the system. This orphan data slows down queries and causes the database size to grow.
Original Post https://anithasantosh.wordpress.com/2024/11/07/clean-up-jobs-in-d365fo/