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
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
Step 02: Create a new Table and new field : Load ID
EDT should be set into Load ID field.
Step 03: Write a new methods in CustParameters Table
Step 04: Class: NumberSeqModuleCustomer
Override method : LoadModule()
Step 05: Write a job and run
Then go to Accounts Receivable – Setup – Parameters – Account Receivable Parameters
Step 06: Run the wizard
Organization Administration >> CommonForms >> Numbersequences >> Numbersequences>> Generate >> run the wizard.
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
Step 08: Now it’s appeared in Accounts Receivable Parameters form
Step 09: Organization administration – Common – Number Sequences – Number sequences
Step 10: Now we can check that number sequence is generated correctly or not
Step 11: Setup number sequence in Form (TestNumberSequence)
Form [Name]: Classdecleration()
Form [Name]: NumberSeqFormHandler()
Form [Name] : Close()
Form [Name]: DS – Create()
Form [Name]: DS – ValidateWrite()
Form [Name]: DS – Write()
Form [Name]: DS – Delete()
Form [Name]: DS – LinkActive()
Output: Number Sequence in Form
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.