BeyondERP.Newsletter
Menu

Setup step on the Cost calculation details page · Cost management

Clean up old cost calculation details

Delete calculation details of old cost calculations once their costs are active and analysed.

Used by
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 isA 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 hereUse this periodic task to remove old cost calculation details that are no longer needed, separately for sales line, planned cost and standard cost calculations.
ExampleFor 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.
Cost calculation details page in Dynamics 365
The page in Dynamics 365. page title tab to open what to set or check
Functional consultant · Solution architect

2Where it fits

End user · Functional consultant

3How to do it

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 itWhen old BOM and cost calculation details are no longer needed for analysis, for example after a new standard costing version is active.
How oftenOn demand, after the business confirms which calculation history can go.
Batch settingsRun it as a batch job outside business hours when many calculations are stored.
What the output showsStored 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.

Source: Microsoft Learn

Setup steps on this page

Clean up old cost calculation details

Delete calculation details of old cost calculations once their costs are active and analysed.

Steps from Microsoft

  1. Go to Cost management > Inventory accounting > Clean up > Cost calculation details.
  2. 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.
  3. 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.
  4. For each kind you turned on, enter the Clean up details before date; calculation details older than that date are removed.
  5. 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.

Source: Microsoft Learn

Fields on the page

FieldWhat it meansExample
Clean up cross costing versionsIncludes calculation details from all costing versions when set to Yes.Checked in Dynamics 365No
Apply to sales lineCleans up the details of cost calculations made for sales lines.Checked in Dynamics 365No
Apply to planned costCleans up the details of planned cost calculations.Checked in Dynamics 365No
Apply to standard costCleans up the details of standard cost calculations.Checked in Dynamics 365No
Clean up details beforeFor each kind of calculation, details older than this date are deleted.Checked in Dynamics 3651/1/2026
Run in the backgroundSends 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

MessageWhat to do
The calculation details of a recent calculation are goneA 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

  1. Calculations after the chosen dates still show their details.
  2. Active item prices are unchanged.

Source: Microsoft Learn

Functional consultant

4Setup decisions

Setup stepRecommended value and whyDecision, common mistake and test
Clean up old cost calculation detailsKeep 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.How long are cost calculation details kept?Setting Clean up cross costing versions to Yes with a recent date, which removes details still used for variance analysis.Test: Only old details are deleted

Feature management and licence

Feature to turn onClean up BOM calculation details cross costing versions (Mandatory from 10.0.29)
Licence or add-inIn this system 2 roles can open this page, among them Inventory accountant clerk and Information technology manager.

Microsoft Learn

Solution architect

5Design impact

Shared or per companyPer company: calculation details are kept per legal entity, and the job cleans those of the current legal entity. Microsoft data model
Can it be undoneOne-way: Deleted details can only be recreated by calculating again.
If you change it laterRemoves stored cost calculation details, so older calculations can no longer be analyzed line by line. Microsoft Learn
Technical architect

6Technical

Menu itemaction:BOMCalcCleanUp Checked in Dynamics 365
FormDialog Checked in Dynamics 365
Who can open it

2 security roles. Select a role to see its duties and privileges.

  • RoleInformation technology managerSysServerITManager
    • DutyMaintain system settingsSysServerSettingsMaintain
      • PrivilegeClean up cost calculation detailsBOMCalcCleanUpProcess
  • RoleInventory accountant clerkInventCostCostClerk
    • DutyMaintain cost masterCostingVersionCostMasterMaintain
      • 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 itTo 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
Developer

7Developer

Open it by URLhttps://<your-environment>/?mi=action:BOMCalcCleanUp
Data migrationLoad 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
Everyone

8Sources

To cite this step: CM-CLN-050, Clean up old cost calculation details. Beyond ERP Atlas Hub. https://www.beyonderp.cloud/atlas/step/CM-CLN-050