Set up expiration management

Article08/01/20248 min read

General expiration management setup

Before being able to change the expiration date of an existing lot, you must set up a journal template name and a journal batch name. This is essential because the function to change the expiration date uses the Item Reclassification Journal for which a journal template and batch is used.

There can be several general journal templates in Microsoft Dynamics 365 Business Central. Each journal template is represented by a dedicated page with specific functions and the fields that are required to support those functions. For each journal template, it’s necessary to set up a journal batch. The No. Series field must have a value in the item journal batch. If the No. Series field on the journal batch is filled, the posting function in general journals requires that the document number on individual or grouped journal lines are in sequential order. This is done by turning on the Default Nos toggle in the No. Series list. This will automatically fill the field with the next number in the series.

When changing the expiration date, the set up item journal template name is used. A new item journal batch is automatically created with your own username. This item journal batch name is linked to the earlier mentioned item journal name which is used by the Change Expiration Date function. It is important not to add any manual lines in this item reclassification journal name and batch, because they are removed when using the Change Expiration Date function.

  1. Select the Search icon , enter Expiration Management Setup and then choose the related link.
    The Expiration Management Setup page opens.
  2. Click the lookup button in the Journal Template Name field.
  3. Select the required journal template name used for changing the expiration date.
  4. Click the lookup button in the Journal Batch Name field.
  5. Select the required journal batch name used for changing the expiration date. If a location exists that uses directed put-away and pick, which requires that the location uses advanced warehouse functionality, the following setup must be completed as well.
  6. Click the lookup button in the Warehouse Journal Template Name field.
  7. Select the required journal template name used for changing the expiration date when on the location card the Directed Put-away and Pick toggle is turned on.
  8. Click the lookup button in the Warehouse Journal Batch Name field.
  9. Select the required journal batch name. If a connection between Microsoft Dynamics 365 Business Central and a 3rd party solution or service exists which uses an API to change the expiration date, a reason code must be set up. When using the API “Change Expiration Date”, the “API Reason Code Change Expiration Date” from the Expiration Management Setup page will be used.
  10. Click the lookup button in the API Reason Code Change Expiration Date field.
  11. Select the required reason code that is used when the expiration date is changed through an API.
  12. Turn on the Exclude Sales Expired Lots from FEFO Proposal toggle to exclude lot numbers from FEFO proposals that don’t meet the requirements concerning the minimum sales shelf life as set up for the item or customer. See the topic Exclude lot numbers from FEFO Proposal for more information.
  13. In the Expiration Item Attribute Name field, select the required item attribute for which you want to configure the expiration setup.
Note

Only item attributes with the Type field set to Option on the relevant Item Attribute card page can be used.

For more information, see the Item Attribute Expiration Setup topic that is explained below.

The general setup for expiration management is now completed.

Item Attribute Expiration Setup

You can set up configurations, such as values for minimum sales and purchase shelf life, FEFO inventory warning, for calculating dates for the expiration and expiration action calculation. To do that, follow these steps:

  1. On the Expiration Management Setup page, in the Expiration Item Attribute Name field, select the required item attribute for which you want to set up configurations related to the minimum shelf life, FEFO inventory warning, and calculation of expiration and expiration action dates.
Note

Only item attributes with the Type field set to Option on the relevant Item Attribute card page can be used.

  1. On the action bar, select Actions > Item Attribute Expiration Setup.
    The Item Attribute Expiration Setup page opens.
  2. Enter the required information in the following fields:
FieldDescription
Item Attribute ValueSelect the required item attribute value for configuring the expiration setup. This field is filtered with item attribute values linked to the item attribute selected in the Expiration Item Attribute Name field on the Expiration Management Setup page.
Minimum Purchase Shelf LifeEnter the value for minimum purchase shelf life with a date formula. For more information, see Minimum Shelf Life.
Minimum Sales Shelf LifeEnter the value for minimum sales shelf life with a date formula. This field is editable only when the Source Type field is set to All Customers and Customers. For more information, see Minimum Shelf Life.
Expiration Action CalculationEnter the value for expiration action calculation with a date formula. For more information, see Expiration Action Date.
FEFO Inventory WarningSelect the appropriate option for FEFO inventory warning checks in the documents. For more information, see FEFO Inventory Warning.
Production Date for OutputSelect the appropriate date option based on which the expiration date should be calculated for production and assembly orders. The available options are blank, Posting Date, Starting Date, Ending Date, and Lot Production Date. The default option is Posting Date. For more information, see Expiration Date.
Expiration Date Calc.Select the appropriate date option based on which the expiration date should be calculated for purchase documents. The available options are blank, Document Date, and Vendor Production Date. For more information, see Expiration Date.

Alerts expiration management setup

Multiple alerts can be created in the Expiration Management extension. These alerts can for example be used to send an email with Microsoft Automate or trigger another process in an external system (using Azure Service Bus). Before being able to create alerts, it’s necessary to define some additional expiration management settings.

  1. Select the Search icon , enter Expiration Management Setup and then choose the related link.
    The Expiration Management Setup page opens.
  2. On the Alerts FastTab, turn on the Enable Alerts toggle. This will create for example an alert when the expiration date is changed for a certain lot number and when receiving a lot number which didn’t meet the FEFO Inventory requirement and/or the minimum purchase shelf life. See the topic Expiration Management Alerts for more information.
  3. Enter the Azure Service Bus URL. This specifies the URL for the Expiration Management Alerts Azure function.
  4. The Topic specifies the topic to which messages are sent. Messages are sent to a topic and delivered to one or more associated subscriptions.
  5. The Time to Live specifies the deadline after which content is no longer delivered, or the requested operation is no longer executed.
  6. The Number of Retries specifies the number of attempts to send an expiration management alert. After the retries fail, the circuit breaker will start and deliver the expiration management alert. See Aptean Circuit Breaker for more information. You can select two attributes which will be sent to the alerts.
  7. Click the lookup button in the Expiration Alert Item Attribute 1 field.
  8. Select the required Name.
  9. Click the lookup button in the Expiration Alert Item Attribute 2 field.
  10. Select the required Name.
  11. The Last Run Date Expired Alerts specifies the last date the batch “Create Expired Expiration Management Alerts” has run.
  12. In the Failing Expiration Check field, select the required option from the following:
    • Icon & Warning – Select this option to trigger a warning when the minimum shelf life or FEFO inventory warning requirement is not met. This is the default option. Despite the warning, you can still be able to proceed with the process.
    • Icon & Error - Select this option to trigger an error when the minimum shelf life or FEFO inventory warning requirement is not met. To proceed further in the process, you must resolve the error.
      For more information, see Minimum Shelf Life and FEFO Inventory Warning.

The Alerts Expiration Management Setup is now completed.

Icon setup

When using the Minimum Shelf Life Warning or the Inventory FEFO Warning, it is necessary to set up the icons that will be shown on the item tracking lines. When installing the module, default icons are set up. Afterwards the setup can be changed as described below.

  1. Select the Search icon , enter Icon Setup for Expiration Management and then choose the related link.
    The Icon Setup for Expiration Management page opens.
  2. Click Warning.
  3. Click Choose in the Select Picture dialog box.
  4. Select an image. You can reset all icons to their default image.
  5. On the action bar, click Actions > Set Icons to Default.
  6. Click Yes in the dialog box, ”Your icons will be overwritten. Do you want to continue?”

The icons are now reset to their default image.

The Icon Setup is now completed.