How to create new number sequence

now i have added a new field in form and realted table so i want this field is automatically generate in sequentially

so please help me for this question

how to crate new number sequence &how to use

I have added a new field CT3NO & CT3Type , when i select a ct3type is CT-3 then ct3 number is automatically generate sequentially

In the Class node in the AOT you could able to find too many Classes starting as “NumberSeqReference_” and each type of these classes will have an method Called “Load Module”. You need to alter in that method to get the data in Number Sequence Reference Form. For example if you need to do it in AR Module, then the load module function in the “NumberSeqReference_Customer” class needs to be modified.

To let any field to be generated sequentially you must do the following:

Suggest i have a table named NoobsTable and a field named NoobId, the extended data type for NoobId is NoobEDT
and i have a Form named NoobsForm

  1. For example if the NoobsForm is located in Inventory managment Module you should find the class named NumberSeqReference_Inventory, then go to LoadModule method in that class and write the following at last:

numRef.dataTypeId = typeId2ExtendedTypeId(typeid(NoobEDT)); //Extended datatype related to NoobId.
numRef.referenceHelp = literalStr(“HelpText”); // Your help text to be viewed in Parameters later.
numRef.wizardContinuous = true;
numRef.wizardManual = NoYes::No;
numRef.wizardAllowChangeDown = NoYes::No;
numRef.wizardAllowChangeUp = NoYes::No;
numRef.wizardHighest = 99999999;
numRef.sortField = 1;


2)Then go to Table node and find InventParameters, go to methods node then add a new method and write the following:

server static NumberSequenceReference numRefNoobId()
return NumberSeqReference::findReference(typeId2ExtendedTypeId(typeid(NoobEDT))); //Extended datatype

3)Then go to Inventroy managment content pane → Setup → Parameters → Number Sequences Tab
now here you will see the Extended Data type NoobEDT and an empty Sequence number code, right click the empty lookup and click Go to the main table Form.
Add a new number sequence code in the opened form and save it [for example]:
Number sequence code: NoobNumberSeq
Name: NoobNumberSeq
Smallest: 1
Largest: 99999999
Next: 1
Format: Noob_########
InUse: Checked

Return to previous Form “Parameters” and choose NoobNumberSeq that we have just created it from Number sequence code lookup to NoobEDT Reference

3)Last thing to do is Go to NoobsForm → Datasources node → NoobsTable → Methods, and override method (create) and write the following:

public void create(boolean _append = false)

NoobsTable.NoobId = NumberSeq::newGetNum(InventParameters::numRefNoobId(),true).num(); //numRefNoobId() is a method created in step 2)


Finally go to the form and create a new record and you will see your number is generated automatically and sequentially.

Note: go to NoobsTable and set NoobId field to( AllowEdit:No AllowEditOnCreate:No ) if you dont want anyone to edit the generated number.


Hi Akshay,

Have a look here -


Thanks Noob…Your Information was very helpful.Keep Posting likewise.

Thanks Noob…Your Information was very helpful.Keep Posting likewise.

what is the numRef in "numRef.dataTypeId = typeId2ExtendedTypeId(typeid(NoobEDT)); "

where should numRef be defined. And also I could not see the class “NumberSeqReference_Inventory” in Classes node of AOT.

Have you got the Number Sequence generated using steps mentioned by Noobs…can you help me out if yes.