Tuesday, 18 February 2020

AX 2012 number sequence by code

NumberSequenceTable numt;
    NumberSequenceReference numR;
    NumberSeq num;   
    EMCClinicParameters _EMCClinicParameters;
    EEMC_ProgRegId _EEMC_ProgRegId;
    select firstOnly _EMCClinicParameters;
    if (_EMCClinicParameters.CustProgramSequnce !="")
    {

       
 
    num = NumberSeq::newGetNumFromCode(_EMCClinicParameters.CustProgramSequnce,NumberSeqScopeFactory::createDefaultScope(), false, false);

 
    this.ProgRegId = num.num();
       
    }

/////////////////////////////////////
///////////////////////// Create the number sequence as type of comapny

No comments:

Post a Comment