Auto Generated Number ID from Number sequence

Hi All,

I have a form as shown below. Currently it is manual ,and the user feeds in the Security Cash Reference number as shown below.

I want it to be made autogenrated from the number sequence. like 000001 etc…

1 I have a created a number sequence code called Sec_Ref with format #####

2 I have created an EDT à NumSeqSecurityCashRef

3 I have included the code in the class NumberSeqModuleHRM .

datatype.parmDatatypeId(extendedTypeNum(NumSeqSecurityCashRef));

//define its default properties

datatype.parmReferenceHelp(literalStr(“000001”));

datatype.parmWizardIsContinuous(true);

datatype.parmWizardIsManual(NoYes::No);

datatype.parmWizardIsChangeDownAllowed(NoYes::No);

datatype.parmWizardIsChangeUpAllowed(NoYes::No);

datatype.parmWizardHighest(999999);

datatype.parmSortField(1);

//define its scope

datatype.addParameterType(NumberSeqParameterType::DataArea, true, false);

this.create(datatype);

4 I have linked the EDT with the Table caeSecurityCashRef à Field Ref

5 In the Form CaeSecurityCashRef à Added the code for the following methods :NumberSeqFormHandler & close in the form level

6 Added the code for the following methods caeSecurityCashRef_ds à create, write, validateWrite, delete, linkActive

pastedimage1487835037676v1.png

But its not working still. Could someone please assist?

Thanks

You seem to be talking about AX 2012 (please attach a version tag next time), therefore you’ll find sample code in Using the Enhanced Number Sequence Framework (White paper) [AX 2012].

Thanks Martin. I have a made a small mistake in the parameters screen. Now I fixed the issue and it’s working.

Could you please tell us what was wrong? If others have the same problem and find this thread, it will be great if they get the answer.
Then please mark your answer as the verified solution. Thank you!