Information technology manager, Inventory accountant clerk
Business process
Manage data
Menu item
action:BOMCalcCleanUp
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, “Only old details are deleted”, 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 stored cost calculation details, the line-by-line results of cost calculations for sales lines, planned costs and standard costs, from before a date you choose.
What you do here
Use this periodic task to remove old cost calculation details that are no longer needed, separately for sales line, planned cost and standard cost calculations.
Example
For example, after the 2027-STD costing version is active, BEAT's cost clerk deletes the standard cost calculation details created before 1/1/2026, keeping the 2026 and 2027 details for analysis.
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
When old BOM and cost calculation details are no longer needed for analysis, for example after a new standard costing version is active.
How often
On demand, after the business confirms which calculation history can go.
Batch settings
Run it as a batch job outside business hours when many calculations are stored.
What the output shows
Stored cost calculation details before the chosen dates are deleted for the selected calculation kinds. If a recent calculation lost its details, a date or Apply to option was set too wide.
Delete calculation details of old cost calculations once their costs are active and analysed.
Steps from Microsoft
Go to Cost management > Inventory accounting > Clean up > Cost calculation details.
Under Parameters, set Clean up cross costing versions to Yes if details from all costing versions should be included, or No to keep it narrower.
Turn on Apply to sales line, Apply to planned cost and Apply to standard cost only for the kinds of cost calculation whose details you want to remove.
For each kind you turned on, enter the Clean up details before date; calculation details older than that date are removed.
Run it in the background outside business hours, then open the calculation details of an old and a recent calculation to see that only the old details are gone.
Includes calculation details from all costing versions when set to Yes.Checked in Dynamics 365
No
Apply to sales line
Cleans up the details of cost calculations made for sales lines.Checked in Dynamics 365
No
Apply to planned cost
Cleans up the details of planned cost calculations.Checked in Dynamics 365
No
Apply to standard cost
Cleans up the details of standard cost calculations.Checked in Dynamics 365
No
Clean up details before
For each kind of calculation, details older than this date are deleted.Checked in Dynamics 365
1/1/2026
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
The calculation details of a recent calculation are gone
A Clean up details before date was set too late, or Clean up cross costing versions was Yes. The details can only be shown again by running the cost calculation again. Microsoft Learn
Test checklist
Calculations after the chosen dates still show their details.
Keep the details of the active and previous standard costing versions; delete older standard and planned cost details once a year.Deleted details can't be shown again without rerunning the calculation, and the active item prices themselves aren't affected.
PrivilegeClean up cost calculation detailsBOMCalcCleanUpProcess
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 itInventory accountant clerk InventCostCostClerkInformation technology manager SysServerITManagerGive people one of these roles. On this system, 2 roles can run this page.Checked in Dynamics 365
Load order: Cost calculation details has no data entity in Data management, so it can't be loaded from a file or a configuration template. Calculation details are produced by cost calculations in the system; nothing is migrated.Checked in Dynamics 365