Live Chat Software

MSDyn365FO Pre-upgrade Cleaning, Part 9 – Inventory Dimension Cleanup

This blog is the next part of a multi-part blog series by our very own Nathan Clouse detailing some preparatory tasks that you can perform ahead of doing a database upgrade to reduce upgrade time.  This information is particularly useful when preparing to upgrade from Dynamics AX 2012 to Dynamics 365 for Finance and Operations, as database size increases time needed to move files between environments and perform the upgrade steps.  Look for additional releases in this series in the coming weeks!

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).

Clean up inventory dimensions in AX 2012
Clean up inventory dimensions in AX 2012

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.

Clean up inventory dimensions in Dynamics 365
Clean up inventory dimensions in Dynamics 365

Looking for the other posts?

MSDyn365FO Pre-upgrade Cleaning, Part 1 – Load Adjustments

MSDyn365FO Pre-upgrade Cleaning, Part 2 – Inventory Journals

MSDyn365FO Pre-upgrade Cleaning, Part 3 – Cost calculation details

MSDyn365FO Pre-upgrade Cleaning, Part 4 – Inventory settlements clean up

MSDyn365FO Pre-upgrade Cleaning, Part 5 – On-hand entries aggregation by financial dimensions

MSDyn365FO Pre-upgrade Cleaning, Part 6 – On-hand entries cleanup

MSDyn365FO Pre-upgrade Cleaning, Part 7 – Warehouse management on-hand entries cleanup

MSDyn365FO Pre-upgrade Cleaning, Part 8 – Dimension inconsistency cleanup

Want to learn about upgrades?

Dynamics 365 Finance Operations Upgrade

Recent Posts

Contact us

Tags