How to use a recurring Integration Endpoint for importing data
You are here
Inventory Dimension Cleanup
Inventory Dimensions get created for all product, storage and tracking dimensions used but do we need to keep them around forever? Let's review.
Inventory dimension cleanup
Inventory dimensions in AX and Dynamics 365 For Finance and Supply Chain are an interesting construct and design choice. These are using to sum up product, tracking and storage dimensions into a single identifier that can be used throughout the system. The system will create them as needed and leave them there for later use. If you are receiving a PO into a newly created warehouse, as part of the receipt process, the system will create an inventory dimension identifier for where ever you are receiving that product into plus any other product or tracking dimensions. However, as things change in your organization, as workflows and processes change, the system isnΓÇÖt going to clean up stuff that was used, potentially just once, and then never used again. The system will reuse inventory dimensions whenever it can but you may have some out there that are no longer used and will never be used again. There is functionality to clean up aging inventory dimensions that are no longer in use. As a specific call out, the message you are presented with reads as follows:
Warning: The Clean up unused inventory dimensions batch process deletes all existing inventory dimensions that are defined but not used in the current company and are created 14 days prior to the cleanup execution time. Unused inventory dimensions are deleted permanently. No alert or database log is created during the process. Do not run this process without a valid reason. Make sure that the process is scheduled to be run outside of business hours.
Valid reasons include changes to usage of product, storage or tracking dimensions on released products over time as well as removal of references to old(er), custom dimensions added in AX 2012.
Where is this in AX 2012
In Inventory Management > Periodic > Clean up, look for Inventory Dimension Clean up. This will identify what inventory dimension (InventDim) records are not in use and delete them. 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).
Where is this in Dynamics 365 for Finance and Supply Chain
This can be found in the same place and functionally does the same thing. This has received a few technically focused updates as certain back-end concepts that have changed or shifted a little. These changes donΓÇÖt affect functionality and provide minor performance enhancements in a few circumstances.
Other Versions
This is available in all versions of AX 2012 and AX 2009.