BeyondERP.Newsletter
Menu

Setup step on the On-hand entries cleanup page · Inventory management

Delete closed on-hand entries for tracked items

Run On-hand entries cleanup safely and only when the data is no longer needed.

Used by
Information technology manager
Business process
Manage data
Menu item
action:InventCleanupTrackingInventSum
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, “Closed entries removed, open on-hand unchanged”, 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 closed and unused on-hand entries for items that use one or more tracking dimensions.
What you do hereUse this periodic task to make on-hand inventory queries run faster.
ExampleFor example, BEAT tracks headsets by serial number and has 3.1 million closed on-hand rows with zero quantity and cost. BEAT runs On-hand entries cleanup weekly with Delete if not updated for this many days set to 30, after finance agrees that past-date Physical inventory by inventory dimension reports may show gaps.
On-hand entries cleanup 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

Business processManage data
Menu pathInventory management › Periodic tasks › Clean up › On-hand entries cleanup
Set up firstPhysical inventory by inventory dimension Microsoft Learn
Used next byOn-hand list Microsoft Learn
Related pagesWarehouse management on-hand cleanup Microsoft Learn
In this process Delete unused inventory dimension combinations · Delete zero warehouse on-hand records
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 on-hand queries for items with tracking dimensions slow down because of many closed, zero on-hand entries.
How oftenOn demand or as a recurring batch job. Microsoft gives no fixed interval.
Batch settingsRun it as a recurring batch job so closed entries are removed regularly, and test it first in a test environment.
What the output showsFewer on-hand rows for items with tracking dimensions: closed entries whose quantities and cost values are all zero are deleted. On-hand for items without tracking dimensions is never touched. Gaps in past-date reports point to entries this job removed.

Source: Microsoft Learn

Setup steps on this page

Delete closed on-hand entries for tracked items

Run On-hand entries cleanup safely and only when the data is no longer needed.

Steps from Microsoft

  1. Go to Inventory management > Periodic tasks > Clean up > On-hand entries cleanup.
  2. In Delete if not updated for this many days, enter how long a closed on-hand entry must stay unchanged before it's deleted (the default is 7). Entries that change during that period are kept.
  3. Before you run it, agree with the people who use the Physical inventory by inventory dimension report, because the job can remove data that report needs for past dates.
  4. Use Records to include to limit which on-hand entries are considered, and set batch options under Run in the background.
  5. Afterwards, open on-hand for an item with batch or serial tracking: open quantities and values are the same, and only closed entries with zero quantity and cost are gone.

Source: Microsoft Learn

Fields on the page

FieldWhat it meansExample
Delete if not updated for this many daysClosed entries that haven't changed for this many days are deleted; the default is 7.Microsoft Learn 30

Common errors and fixes

MessageWhat to do
The Physical inventory by inventory dimension report for a past date misses lines.The job removed closed entries that report used. Agree with the report users before you run it, and keep a longer day limit if they need history. Microsoft Learn

Test checklist

  1. Note the open on-hand of three serial-tracked items.
  2. Run the job in a copy with 30 days.
  3. Check that their open on-hand is unchanged.
  4. Check that closed zero entries older than 30 days are gone and newer ones remain.

Source: Microsoft Learn

Functional consultant

4Setup decisions

Setup stepRecommended value and whyDecision, common mistake and test
Delete closed on-hand entries for tracked itemsRun it as a recurring batch job with a day limit agreed with the report users, for example 30 days instead of the default 7.Only closed entries with zero quantities and costs for items with tracking dimensions are removed, which speeds up on-hand queries, but past-date reports lose that detail.How many days should a closed on-hand entry stay before it's deleted?Running it without telling the people who use as-of-date on-hand reports.Test: Closed entries removed, open on-hand unchanged

Feature management and licence

Licence or add-inOn the live system, Information technology manager use this page.

Checked in Dynamics 365

Solution architect

5Design impact

Shared or per companyPer company: the job reads and changes only the data of the legal entity you run it in. Checked in Dynamics 365
Can it be undoneIrreversible: Closed on-hand entries with zero quantity and cost are deleted for good, and reports for past dates can show incomplete data. Run it first in a copy of production, such as a sandbox refreshed from production, and give the privilege only to the people who own the cleanup.
If you change it laterHistorical and "as of date" reports can show incomplete data for periods where on-hand rows were removed. Microsoft Learn
Technical architect

6Technical

Menu itemaction:InventCleanupTrackingInventSum Checked in Dynamics 365
FormSysOperationTemplateForm Checked in Dynamics 365
Who can open it

1 security role. Select a role to see its duties and privileges.

  • RoleInformation technology managerSysServerITManager
    • DutyMaintain system settingsSysServerSettingsMaintain
      • PrivilegeClean up closed on-hand entriesInventCleanupTrackingInventSumProcess
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 itInformation technology manager SysServerITManagerGive people one of these roles. On this system, 1 role can run this page.Checked in Dynamics 365
Developer

7Developer

Open it by URLhttps://<your-environment>/?mi=action:InventCleanupTrackingInventSum
Data migrationLoad order: On-hand entries cleanup has no data entity in Data management. On-hand entries come from the opening on-hand journals and later transactions; nothing is migrated for this job.Checked in Dynamics 365
Everyone

8Sources

To cite this step: IM-JOBA-120, Delete closed on-hand entries for tracked items. Beyond ERP Atlas Hub. https://www.beyonderp.cloud/atlas/step/IM-JOBA-120