AX 2012 : How to create new number sequence ?

Microsoft Dynamics AX

Number sequences in Dynamics AX are used to generate specifically formatted numbers for record identification. for example Sales Id, Purchase Id, Journal number etc.

Very often we need to customize functionality which require new number sequence to be generated for new table designed.Dynamics AX contains a list of NumberSeqApplicationModule derivative classes, which holds the number sequence setup data for the specific module. These classes are read by the number sequence wizard, which detects existing number sequences and proposes to create the missing ones or newly added ones.

Suppose we have created new table “KitTable” with fields KitId and KitName, and we have to generate number sequence for KitId. This table belongs to Sales module.

Lets look at the steps to do this job :

1. Open the NumberSeqModuleCustomer class in the Application Object Tree (AOT), and add the following code to the bottom of the loadModule() method:

datatype.parmReferenceHelp(“Kit ID”);

View original post 490 more words