Number Sequence Framework in AX 2012 R3 (Existing module)

Number Sequence Framework in AX 2012 R3 - Existing module

Number sequences in Microsoft Dynamics AX are used to generate readable, unique identifiers for master data records and transaction records that require identifiers.

A master data record or transaction record that requires an identifier is referred to as a reference. Before you can create new records for a reference in Microsoft Dynamics AX, we must set up a number sequence and associate it with the reference. We use Organization administration to set up number sequences.

Purpose of Number Sequence:

The purpose of number sequence framework is to provide user-friendly, unique identifies while maintaining a continuous or non-continuous alpha numeric sequence.

Main concept in Number Sequence

There are 2 main concepts in Number sequence.

Scope: A scope is a valid combination of segments used for a specific transaction or master data entry. Company name will be mentioned in scope.

Segment: A segment (also known as parameter) is a data entity such as legal entity, operating unit that can be used to define a number sequence format.

Flow chart: Number sequence

Number Sequence Existing Module 1

How to create number sequence in existing module:

Example: Accounts Receivable

Step 01: Create an EDT (Extended Data Type)
AOT – Data Dictionary – Extended Data Types

Number Sequence Existing Module 2

Step 02: Create a new Table and new field : Load ID
EDT should be set into Load ID field.

Number Sequence Existing Module 3

Number Sequence Existing Module 4

Step 03: Write a new methods in CustParameters Table

Number Sequence Existing Module 5

Step 04: Class: NumberSeqModuleCustomer
Override method : LoadModule()

Number Sequence Existing Module 6

Number Sequence Existing Module 7

Step 05: Write a job and run

Number Sequence Existing Module 8

Then go to Accounts Receivable – Setup – Parameters – Account Receivable Parameters

Number Sequence Existing Module 9

Step 06: Run the wizard

Organization Administration >> CommonForms >>  Numbersequences >> Numbersequences>> Generate >> run the wizard.

Number Sequence Existing Module 10

Here we saw that it will automatically generate 5 Load Ids respective to all companies. If we want we can delete other load id before next process.

Step 07: Here we only run for PHEcompany

Number Sequence Existing Module 11

Step 08: Now it’s appeared in Accounts Receivable Parameters form

Number Sequence Existing Module 12

Step 09: Organization administration – Common – Number Sequences – Number sequences

Number Sequence Existing Module 13

Number Sequence Existing Module 14

Step 10: Now we can check that number sequence is generated correctly or not

Number Sequence Existing Module 15

Number Sequence Existing Module 16

Step 11: Setup number sequence in Form (TestNumberSequence)

Form [Name]: Classdecleration()

Number Sequence Existing Module 17

Form [Name]: NumberSeqFormHandler()

Number Sequence Existing Module 18

Form [Name] : Close()

Number Sequence Existing Module 19

Form [Name]: DS – Create()

Number Sequence Existing Module 20

Form [Name]: DS – ValidateWrite()

Number Sequence Existing Module 21

Form [Name]: DS – Write()

Number Sequence Existing Module 22

Form [Name]: DS – Delete()

Number Sequence Existing Module 23

Form [Name]: DS – LinkActive()

 Number Sequence Existing Module 24

Output:  Number Sequence in Form

Number Sequence Existing Module 25

In this tutorial, Microsoft Dynamics AX developers have explained us about setting up number sequences in Microsoft Dynamics AX. If you face any difficulties in the coding part, please leave your comments below, we would be happy to help.

310 Total Views 2 Views Today


Vijay is a compulsive blogger who likes to educate like-minded people on various new technologies and trends. He works with Aegis SoftTech as a software developer and has been developing software for years. Stay Connected to him on Facebook and Google+.