web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

How to Create Number Sequence in Ax 2012 with the help of few steps not follow 10 steps ...

(0) ShareShare
ReportReport
Posted on by 875

How to Create Number Sequence  in Ax 2012.

*This post is locked for comments

I have the same question (0)
  • Verified answer
    naveen singh Profile Picture
    780 on at

    Hi Vikash,

    follow these steps

    - Open the NumberSeqModuleXXXX class in the Application Object Tree (AOT), and add the following code to the bottom of the loadModule() method:

       datatype.parmDatatypeId(extendedTypeNum(Your EDT);

       datatype.parmReferenceHelp(literalStr("XXXXX"));

       datatype.parmWizardIsManual(NoYes::No);

       datatype.parmWizardIsChangeDownAllowed(NoYes::No);

       datatype.parmWizardIsChangeUpAllowed(NoYes::No);

       datatype.parmSortField(1);

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

       this.create(datatype);

    -Create a new job with the following code and run it:

    static void NumberSeqLoadAll(Args _args)

    {    

            NumberSeqApplicationModule::loadAll();

    }

    -Run the number sequence wizard by clicking on the Generate button in Organization administration | Common | Number sequences | Number sequences, and click on the Next button.

    -Click on Details to view more information. Delete everything apart from the lines where Area is Your Module Name and Reference is "Refernce as passed in Load module". Note the number sequence codes, and click on the Next button:then finish.

    -The newly created number sequences can now be found in Organization administration | Number sequences | Number sequences.

    - Open Your Module | Setup | Your Module parameters and go to the Number sequences tab page. Here we should see the new number sequence code:

    -The last thing to do is to create a helper method for this number sequence. Locate the Your Module Parameters table in the AOT and create the following method:

    public server static NumberSequenceReference numRefCustGroupId()

    {    

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

    }

  • Verified answer
    Mallika Roy Profile Picture
    552 on at

    Hi Vikash,

    Following are steps to create new NumberSequence in Ax 2012 :

    1. Open the NumberSeqModuleXXX (XXX is for the module name e.g. NUmberSeqModuleCustomer, NumberSeqModuleHRM etc) class in the Application Object Tree (AOT) and add the following code to the bottom of the loadModule() method:

    datatype.parmDatatypeId(extendedTypeNum(YYYY)); //EDT used for number sequence

    datatype.parmReferenceHelp("zzzzzzzzzzz");

    datatype.parmWizardIsContinuous(false);

    datatype.parmWizardIsManual(NoYes::No);

    datatype.parmWizardIsChangeDownAllowed(NoYes::Yes);

    datatype.parmWizardIsChangeUpAllowed(NoYes::Yes);

    datatype.parmWizardHighest(999);

    datatype.parmSortField(20);

    datatype.addParameterType(

    NumberSeqParameterType::DataArea, true, false);

    this.create(datatype);

    2.Create a new job with following code and run it:

    static void NumberSeqLoadAll(Args _args)

    {

      NumberSeqApplicationModule::loadAll();

    }

    3.Run the number sequence wizard on the Organization

    administration >Common >Number sequences > Number sequences > Generate and click on the Next button. Click on Details for more information. Delete the lines except the desired lines ( lines with your module and reference to your EDT). Click next and finish the wizard.

    4.You will find the newly created numberSequence in the respective module's parameters form under numbersequence tab. In the parameters table(zzzzParameters) in the AOT create the following method:

    public server static NumberSequenceReference numRefYYYY()

    {

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

    }

    5.To use the number sequence refer to the following code :

    public void initValue()

    {  

       NumberSeq   NumSeq;

       ;

       super();

       NumSeq =  NumberSeq::newGetNum(zzzzParameters::numRefYYYY(),true);

       //NumSeq.num(); this will create new numbers.

    }

  • Verified answer
    Vikas_AX_Blogs Profile Picture
    875 on at

    Thanks Naveen and Mallika

  • Community Member Profile Picture
    on at

    5.To use the number sequence refer to the following code :

    public void initValue()

    {  

       NumberSeq   NumSeq;

       ;

       super();

       NumSeq =  NumberSeq::newGetNum(zzzzParameters::numRefYYYY(),true);

       //NumSeq.num(); this will create new numbers.

    }

    where to write this??and what is zzzz parameters??

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans