Clean up unused inventory dimensions only with a reason
Cost managementInventory accountingClean up
action:InventUnusedDimCleanUp
Used by
Information technology manager
Business process
Manage data
Menu item
action:InventUnusedDimCleanUp
Setup steps
1 on this page
How this guide was checked
Checked in Dynamics 365
Version 10.0.49: the menu item, form, table and security, the page.
Recommended values
Based on Microsoft's documentation. A sound starting point to adjust to your own business requirements.
Tests
A ready-to-run test, “Used combinations survive”, to confirm this setup in your own test environment.
Show what matters for
SETUP GUIDEHow to set it up8 sections. Choose a role to highlight what matters to you.
Everyone
1What it is and why
What it is
A periodic job that deletes inventory dimension combinations that are defined but not used in the current company.
What you do here
Use this periodic task to keep the inventory dimensions table small by removing combinations that nothing refers to.
Example
For example, a data migration test left about 40,000 unused inventory dimension combinations in BEAT; the IT manager runs the cleanup for the creation range of that load, outside business hours, and the combinations still used by orders and on-hand stay.
The page in Dynamics 365. page title tab to open what to set or check
About the examples: Examples and screenshots in this guide use BEAT, a demo company in a Dynamics 365 test environment. Use your own company's codes and values instead of copying them.
When to run it
When to run it
Only when the inventory dimensions table has grown with unused combinations and you have a clear reason to clean it, after a trial run in a test environment.
How often
Rarely, on demand; Microsoft advises not to run it without a good reason.
Batch settings
Run it as a scheduled batch job outside business hours, as Microsoft recommends.
What the output shows
Unused inventory dimension combinations in the chosen range are removed from the InventDim table. Combinations referenced by order lines, inventory transactions or on-hand records stay. If the same combination is needed again later, the system creates a new record with a new InventDimId.
Clean up unused inventory dimensions only with a reason
Remove unused inventory dimension combinations created in a known date range.
Steps from Microsoft
Go to Cost management > Inventory accounting > Clean up > Inventory dimensions cleanup.
Read the warning under Parameters: every inventory dimension combination that is defined but not used in the current company is deleted for good, and no alert or database log is created.
Enter Clean up after and Clean up before to target only the dimension combinations that were created in that date and time range.
Schedule it under Run in the background for a time outside business hours, then select OK.
Compare the number of inventory dimension records before and after the run, and open a few orders and on-hand records to see that dimensions still in use are intact.
The start of the creation date and time range; only unused dimension combinations created after it are deleted.Checked in Dynamics 365
10/4/2025 04:51 AM
Clean up before
The end of the creation date and time range.Checked in Dynamics 365
10/4/2026 04:51 AM
Run in the background
Sends the job to the batch framework with a batch group, recurrence and alerts instead of running it while you wait.Checked in Dynamics 365
Common errors and fixes
Message
What to do
An inventory dimension combination is missing after the run
The job deletes every combination defined but not used in the company within the date range, and nothing is logged. When the same combination is needed again the system creates a new record with a new InventDimId; use a narrow date range next time. Microsoft Learn
Test checklist
Open purchase lines, sales lines and on-hand records still show their dimensions.
Only combinations created between the two dates were removed.
Run it only for a narrow creation range with a known cause, such as a test data load, outside business hours and after a test run.Microsoft warns that unused combinations are deleted permanently with no alert or database log, and advises not to run the job without a good reason.
In this system 1 role can open this page, among them Information technology manager.
Checked in Dynamics 365
Solution architect
5Design impact
Shared or per company
Per company: the job deletes combinations that are not used in the current company. Microsoft Learn
Can it be undone
One-way: Deleted dimension combinations can't be restored and nothing is logged.
If you change it later
Unused dimension combinations are deleted for good and no log is kept, so run the job only with good reason and outside business hours. Microsoft Learn
Technical architect
6Technical
Menu item
action:InventUnusedDimCleanUpChecked in Dynamics 365
Form
DialogChecked in Dynamics 365
Who can open it
1 security role. Select a role to see its duties and privileges.
DutyMaintain system settingsSysServerSettingsMaintain
PrivilegeClean up inventory dimensionsInventUnusedDimCleanUpProcess
Roles worked out from Microsoft's standard security setup and checked in a working Dynamics 365 system (version 10.0.49)
Roles to set it up and use it
To use itInformation technology manager SysServerITManagerGive people one of these roles. On this system, 1 role can run this page.Checked in Dynamics 365
Load order: Inventory dimensions cleanup has no data entity in Data management, so it can't be loaded from a file or a configuration template. It deletes unused InventDim records; nothing is migrated.Checked in Dynamics 365
Checked in a working Dynamics 365 system, version 10.0.49: the menu item, form, table and security, the page.
To cite this step: CM-CLN-030, Clean up unused inventory dimensions only with a reason. Beyond ERP Atlas Hub. https://www.beyonderp.cloud/atlas/step/CM-CLN-030