- Create a new EDT of type string and length say 20. Name this EDT as MySequenceEDT. Give label as "My sequence".
- Travserse to class "NumberSeqReference_Customer". Remember that the base class for number sequence reference is "NumberSeqReference". Since we want to add a new number sequence in AR -> Parameters, we traverse to class that is mentioned above that is "NumberSeqReference_Customer"
- Now open the method "loadModule"
- Append the following piece of code to the method
numRef.dataTypeId = typeId2ExtendedTypeId(typeid(MySequenceEDT)); //MySequenceEDT is a new EDT
numRef.configurationKeyId = configurationKeyNum(ledgerBasic); // This line of code is optional
numRef.referenceHelp = "My number sequence";
numRef.wizardContinuous = false;
numRef.wizardManual = NoYes::No;
numRef.wizardAllowChangeDown = NoYes::No;
numRef.wizardAllowChangeUp = NoYes::No;
numRef.wizardHighest = 999999;
numRef.sortField = 10; //Remember sort field should be one incremented from the reference above. If in the line above sortField is 9 then for our reference it is 10
- Now traverse to the table "CustParameters"
- Add following method to the CustParameters table
static client server NumberSequenceReference numRefSumit()
There you go new number sequence is ready and can be seen in the AR -> Setup -> Parameters -> Number sequences tab