
Use this batch job to maintain the InventDim table by deleting unused inventory dimension combination records that are no longer referenced by any transaction (regardless of whether the transaction is open or closed) or by any master data. You cannot delete an inventory dimension combination record that is still referenced by a transaction, because when you delete an InventDim record, related transactions cannot be reopened.
In Inventory Management > Periodic > Clean up, look for Inventory Dimension Clean up.

It has no options for how it runs except that it can run in batch. It should only every be run in batch as this can take a long time to run. First, it places a soft lock on the process of the cleanup. This is so no other cleanup can be running concurrently. Cleanups are run on a per company basis. Next, it will clean out a table used for temporary storage called InventDimCleanup. This table is used to storage all inventory dimension identifiers (InventDimId) present in Inventory Dimension (InventDim) during the cleanup process. emptying the table at the beginning of the process is a house keeping item just to make sure its empty. Next, it will copy all InventDimIds from table InventDim into table InventDimCleanup. next, it will loop through each InventDimCleanup record for all tables with references to InventDim. If a reference for the given InventDimId can be found, it will be removed from table InventDimCleanup. Next, InventDim records will be deleted where there is a matching InventDimId in the InventDimCleanup table with business logic, delete actions and events being skipped in a single transaction. Finally, the InventDimCleanup table will be emptied (again).
Leave a comment