Purchasing manager, Quality control clerk, Receiving clerk and 3 more roles
Business process
Manage inventory quality
Menu item
action:PdsUpdateBestBefore
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. Some of it is Dynamics AX 2012 documentation, an earlier version.
Tests
A ready-to-run test, “Best before date updated for the selected batch only”, 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 updates the best before date of one or many inventory batches.
What you do here
Use this periodic task to recalculate or set the date by which batches should be used.
Example
For example, BEAT changes the Best before period in days of cold brew BEAT-000620 from 180 to 150. It runs Update best before dates with System for the item's 14 open batches, and batch B-2026-0412, made on 4/12/2026, now has best before date 9/9/2026.
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 the best-before date of batches must be recalculated, for example after the Best before period in days of a product changed, or set to a fixed date.
How often
On demand, when best-before dates need to change.
Batch settings
Use the Batch tab only for large selections of batches.
What the output shows
Updated best-before dates on the selected batches. A batch is still sellable after this date but may have lost some original properties. A date that looks wrong usually means the batch's manufacturing date or the item's period is wrong.
Recalculate or set the best before date of selected batches.
Steps from Microsoft
Go to Inventory management > Periodic tasks > Batches > Update best before dates.
In Data calculation type, select System to calculate the date from the item's Best before period in days, or Fixed to set the same date for every selected batch.
If you selected Fixed, enter the new date in Best before date.
Select Select and filter the inventory batches to update, for example on item number.
Select OK, then open the batches and check the new best-before dates.
Whether the date is calculated by the system from the expiration date or set to a fixed date.Microsoft Learn
System
Best before date
The new best before date to apply when the Fixed type is used.Microsoft Learn
6/30/2027
Common errors and fixes
Message
What to do
The best before date calculated by the System type looks wrong.
System adds the item's Best before period in days to a date of the batch. Check the batch's manufacturing date and the Best before period in days on the released product, then run the job again. Microsoft Learn
Test checklist
Note the best before date of two batches of an item.
Change the item's Best before period in days or choose Fixed with a new date.
Run the job for one batch only.
Check that this batch shows the new best before date and the other is unchanged.
Use System after the Best before period in days of the product changed, and Fixed only for single batches with a known new date; always filter the batches before you select OK.System recalculates the date from the batch and the product's Best before period in days; Fixed writes the same date to every selected batch.
On the live system, Quality control clerk, Shipping clerk, Purchasing manager, Sales manager and Warehouse worker use this page.
Checked in Dynamics 365
Solution architect
5Design impact
Shared or per company
Per company: the job reads and changes only the data of the legal entity you run it in. Batch dates are stored on the batches of that company. Checked in Dynamics 365
Can it be undone
Reversible with effort: A new run overwrites the dates again.
If you change it later
Changes the best-before date on the selected batches, which reports use to find inventory past its best-before date. Microsoft Learn
Technical architect
6Technical
Menu item
action:PdsUpdateBestBeforeChecked in Dynamics 365
Form
DialogChecked in Dynamics 365
Who can open it
6 security roles. Select a role to see its duties and privileges.
PrivilegeMaintain best before date informationPdsUpdateBestBeforeMaintain
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 itQuality control clerk InventQualityControlClerkShipping clerk InventShippingClerkPurchasing manager TradePurchasingManagerSales manager TradeSalesManagerWarehouse worker WMSWarehouseWorkerGive people one of these roles. On this system, 6 roles can run this page.Checked in Dynamics 365
Load order: Update best before dates has no data entity in Data management. Batch dates are loaded with the batches themselves. Load released products and batches with their dates first; run this job in the new system only when dates must change.Checked in Dynamics 365