Number Sequence creation in 2012

To Generate new number sequence in Ax 2012, fallow the below steps:

 

  1. Create EDT
  2. Create new number seq in “Origination Admin” module in Ax
  3. Write new method in NumberSeqModuleHRM in table HRMParameters

static client server NumberSequenceReference numRefDemoforNumberseqy()

{

    return NumberSeqReference::findReference(extendedTypeNum(DemoforNumberseq));

}

  4.  Write code in class(NumberSeqModuleHRM)  loadModule()

    datatype.parmDatatypeId(extendedtypenum(EmplYSSATemporary));

   datatype.parmReferenceHelp(literalstr(“@SYS32633”));

    datatype.parmWizardIsContinuous(true);

    datatype.parmWizardIsManual(NoYes::No);

    datatype.parmWizardIsChangeDownAllowed(NoYes::No);

    datatype.parmWizardIsChangeUpAllowed(NoYes::No);

    datatype.parmWizardHighest(9999);

    datatype.parmSortField(36); 

    this.create(datatype); 

   5. Execute job

     static void NumberSeqLoadAll(Args _args)

 {

    NumberSeqApplicationModule::loadAll();

    info(“jobExecuteD”);

}

   6. Generate number sequence

   7. Write code in form level data source

  MAK_WorkerTrasfer.TransferEmployeeCode = NumberSeq::newGetNum(HRMParameters::numRefYMEPermentEDT(),true).num();

 

for more detail description, please refer below link :

 http://msdn.microsoft.com/en-us/library/aa608474.aspx.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s