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.

Auto generated numbers

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
• Scope
• Segment

Scope

A scope is a valid combination of segments used for a specific transaction or master data entry.

Segment

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
2. Setup

Setup

 

Create a new Number Sequence

New Number Sequence New Number SequenceNew Number SequenceNew Number Sequence

 

New Number Sequence Scope Parameters New Number Sequence Scope ParametersNew Number Sequence Scope Parameters New Number Sequence Scope ParametersNumber Sequence Segments Number Sequence SegmentsSpecify Number Sequence ReferenceSpecify Number Sequence Reference

 

Specify Continuous/Non-Continuous Number SequenceSpecify Continuous/Non-Continuous 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.”

Automatic Cleanup
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

Number SequenceNumber Sequence

Implement the newly created Number Sequence and assign it

Setup Number Sequence for General LedgerSetup Number Sequence for General Ledger

Newly Created Number Sequence in Action

Setup Number Sequence for General LedgerSetup Number Sequence for General Ledger

 

Number Sequence in ActionNumber Sequence in Action

 Part 2

The implementation of number sequence from scratch where you create your own field or EDT is described in part 2.

Follow the link: https://www.abubakershekhani.com/blogs/technology/number-sequence-in-dynamics-ax-2012-part-2

Abubaker Siddiq Shekhani

Abubaker Shekhani is an IT Entrepreneur and Full Stack Developer. He is the co-founder and the Developer behind Mytabeeb, a health care solution. He has worked for 5 years in Microsoft Dynamics AX space with Techno-functional role and glad to be one of few Microsoft Dynamics AX developers/consultants in Pakistan. He is TEDx speaker and likes to speak in public. He is an Amateur Astronomer and Astrophotographer. He is the founding member of Karachi Astronomers Society. He can be reached at me@abubakershekhani.com.

You may also like...