Batch Number Group Functionality: D365 Finance and Operations

The batch number group in Dynamics 365 Finance and Operations is used to automatically assign serial or batch numbers upon certain receipt events. Batch number groups can be activated on certain events and can even allow you to create unique batch numbers using specific variables or a pre-defined number sequence.

Note: On the released products form the field is called “Batch number group” but the actual setup table for this field is “Tracking number group”.

In this post I will just stick to “Batch number group” but know that I am talking about the same thing. In this post we will look at the setup for batch number groups and see what happens when certain parameters are enabled and disabled.

Batch Number Group Setup

To set up a batch number group navigate to Inventory management > Setup > Dimensions > Tracking number groups.

To create a new batch number group, click the “New” button and enter a batch number group ID. Next, in the “Name” field give the group a descriptive name. Below is a description of what each field on the form does. Then in the next section I will walk through an example showing the behavior of the “Only for inventory transaction” and “On physical update” fields.

The first five fields below can be used together or separately to generate a unique batch number. Each field serves as a variable that, if used along with another variable, is concatenated together during automated batch number creation.

  • Date – If this field is enabled the system will take the current date and use it as the batch number that the system generates. If you have one of the other five fields enabled, it will concatenate the date with whatever other variables are also enabled.
  • Reference No.  – If this field is enabled the source order number will be used as the batch number. For example, if you are receiving a purchase order the reference number will be the purchase order ID.
  • Lot ID – If this field is enabled the inventory Lot ID will be used as the batch number. The lot ID is a system generated inventory identifier.
  • Number sequence No. – If this field is enabled you can use a predefined number sequence to be used by the system when a batch number is created. If you enable this field, you must select a number sequence code.
  • Number sequence code – This is the number sequence you want the system to use when the system generates a batch number.
  • Manual – If you enable this option the system will not automatically generate a batch number you will be prompted to enter the batch number manually. Selecting this option is equivalent to not using a batch number group at all. Even if you have other variables enabled selecting the “Manual” flag will mean that you have to manually enter the batch number.
  • Only for inventory transactions – This option will generate a batch number only for the inventory transaction for the source order. For example, if you have a purchase order for 1,000 and you have 5 registrations you will still get a single batch number generated for the transaction. The batch number will also be generated as soon as the transaction is created before any registration has occurred.
  • On physical update – This option is only available if the “Only for inventory transactions” option is enabled. This option will generate a batch number each time a physical receipt occurs for the source order. For example, on a purchase order at the time a registration occurs, the batch number will be created. For production orders the batch number will be generated at the time a report as finish transaction occurs.
  • Per qty. – This value indicates the batches to be generated per quantity. It is intended to be a field for a fixed batch size. Meaning if you set this value to “1” you will get a batch number for each unit registered.
  • Order activation – If you enable this option the system will generate a batch number on return receipt.
  • Purchase activation – If you enable this option the system will generate a batch number during the purchase order process.
  • Inventory activation – If you enable this option the system will generate a batch number during registration on various inventory journals.
  • Production activation – If you enable this option a batch number will be automatically generated when the production order is reported as finished.
  • Kanban activation – This is similar to the “Production activation” selection except for Kanbans.

Assign the Batch Number Group to a Released Product

Once you have the batch number group setup you need to assign it to the released product. It goes without saying but I’ll say it anyway. The product must have a tracking dimension with batch enabled. The “Batch number group” field is in the “Manage inventory” tab of the released products form. To get to the released product form navigate to Product information management > Products > Released products.

Only for Inventory Transactions

For the first example let’s enable the “Only for inventory transactions” and enable the “Purchase activation”. Now we will run through a purchase order receipt and see what happens. I have also set up a predefined number sequence so when the batch is generated by the system it will use that sequence format and take the next available number in the sequence.

Here we have a purchase order for quantity of 48 and there are 24 units to a case. After I create my line if we check the inventory transactions by clicking the “Inventory” dropdown and click “Transactions” we can see that even before doing a registration the batch number for the transaction has already been created.

Now let’s receive both cases one but one at a time.

As you can see even though we did two individual registrations on the mobile application the batch number is the same.

On Physical Update

Now let’s enable the “On physical update” flag and see what happens.

I have created another purchase order line on the same purchase order for the same quantity and I will do two receipts for 1 case each (same as above).

Now after the two registrations we can see that we have a different batch number that was generated for each registration (physical update) that was done. So, depending on how want your batch numbers to be generated for your products you can toggle these options in the appropriate way.


Setting up batch number groups can be difficult if you don’t know what some of the more cryptic parameter settings mean. I hope the demonstrations in this post have given you insight into which settings are right for you to achieve your desired business outcomes.

Tim Woods

Tim has been an AX/D365 Finance and Operations Consultant for over a decade and loves to share insights and knowledge from multiple full cycle implementations.

Recent Posts