Tuesday, 22 March 2016

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();

No comments:

Post a Comment