Number Sequence in Dynamics AX 2012
Introduction to Number Sequence
You might have heard the word auto generated unique identifier for a record in any type of application. Similarly, Microsoft Dynamics AX used Number sequence to uniquely identify a record of a Sales order or a transaction or an Inventory. Number Sequencing is a very significant feature required in an ERP system or any system where you have too many records and they should be uniquely identified.
The auto system generated numbers in a database are very simple and they are not user-friendly and are difficult to categorize or identified by just looking at them. They are simple 1, 2, 3 and so on. To make it efficient and user friendly, Microsoft Dynamics AX employs a number sequencing framework.
Purpose of Number Sequence
These sequences can be used in transaction documents such as sales order, purchase orders, invoices and journals; or for master data entries such as customers, vendors, and employees. The purpose of number sequence framework is to provide user-friendly, unique identifies while maintaining a continuous or non-continuous alpha numeric sequence.A master data or transaction record that requires an identifier is referred to as a reference. Before you can create new records for a reference, you must set up a number sequence and associate it with the reference.
An example of a Number Sequence in Microsoft Dynamics AX 2012
In the above example, Inv-2-967 is a number sequence for the Vendor Invoices in the Accounts Payable. The number is an auto-generated number that was defined before. It is the unique number and tells that it is Invoice with the letters Inv.
The two main concepts in Number Sequence Dynamics AX
There are 2 main concepts
A scope is a valid combination of segments used for a specific transaction or master data entry.
A segment (also known as parameter) is a data entity such as legal entity, operating unit or fiscal calendar period that can be used to define a number sequence.
In the enhanced number sequence framework introduced in the Dynamics AX 2012, a number sequence can have more than one segment. By using scope and segment, Dynamics AX extends the capabilities of the number sequence framework
“All segments in a scope must be related to the underlying transaction or master data entity. For example, a journal transaction will have a relationship with the segments of legal entity and fiscal calendar period (through the transaction or posting date) that make up its scope. The scope can be used to partition the entity instances or transactions based on the segment values. In this example, a journal transaction might be partitioned into categories based on the two segments in its scope.”
How the number sequence is generated – The process
“When an end user creates a document such as a sales order, purchase order, or invoice, the extended data type on the document field—such as SalesID or InvoiceID—is passed to the number sequence framework. In addition, information is passed for the segments such as DataArea, or legal entity plus fiscal calendar period, depending on the scope for the reference. The framework then generates a number sequence code based on these parameters (segments), and this number sequence code is used to generate a number based on the format for the corresponding number sequence.”
Number Sequence – Setup
The number sequence framework requires two steps to setup
1. Segment Configuration
Create a new Number Sequence
“When you select the Continuous check box of a number sequence, the system automatically ensures that no numbers from the current sequence are lost. The system furthermore ensures that selected numbers are returned to the list if an update is unexpectedly terminated or fails.”
To execute the complete cleanup manually, click Clean up. You can also have the complete cleanup executed automatically with a specified time interval. To do this, select the Cleanup check box and specify an interval (in hours) for how often the cleanup should be performed.
Here is the Number Sequence that has been set up
Implement the newly created Number Sequence and assign it
Newly Created Number Sequence in Action
The implementation of number sequence from scratch where you create your own field or EDT is described in part 2.