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)

Custom Number Sequence need to display in my new Form

(0) ShareShare
ReportReport
Posted on by

I searched all the blogs and tried several steps given by many developers but could not get the number sequence generating in my form. 

My Requirement is :

I have created a table with 14 fields and one of the field is RFI Number.  I need to generate my own sequence number for this RFI Number field and that needs to be associated to my New Form.  So that every time I insert a new record from form, new sequence number should be generated and saved in database.

I am new to DAX so I am not sure about the parameter table and how to create that.  May be this is where I am lacking and so I am not able to generate the sequence numbers.  Please provide the exact and complete steps.

Thanks in advance!!

*This post is locked for comments

I have the same question (0)
  • Roderik Latruwe Profile Picture
    85 on at

    this helped me setting up custom number sequences:

    www.axaptapedia.com/.../Number_sequences

    Instead of creating a new parameters form you can use existing ones ;)

  • Martin Dráb Profile Picture
    237,990 Most Valuable Professional on at

    Have you already consulted the documentation?

  • Munna Babu Profile Picture
    on at

    Yeah I did gone through the documentation given by Microsoft, but its not clear....and also followed the steps given in some of the blogs.....I lost when they say to add code for your parameter table...not sure how to create them and the use of these tables.....

    Could you please share if you have any docs or some other info on this Number Sequence.

  • Roderik Latruwe Profile Picture
    85 on at

    For example: You want to add the numsequence to the InventParameters.

    In AOT go to the "InventParameters" table and create a new method that looks like this:

    server static NumberSequenceReference numRefTest()
    {
        return NumberSeqReference::findReference(typeid2ExtendedTypeId(typeid(<Extended DataType>)));
    }

     

    numRefTest can be anything that you want, make it clear for what numsequence it is.

    <Extended Datatype> is your extended datatype for the numsequence you want to create. For example lets say i have an extended datatype named "Cus_PackageID"

    witch extends String then you put "Cus_PackageId" where <Extended DataType> is without quotes.

     

    You can go to the inventparameters form to setup the numsequence to look like "PACK#######" so that every generated id  starts with PACK (in this example).

    To generate a new number just call:

    (table.packageId) = NumberSeq::newGetNum(InventParameters::numRefTest()).num();

    where table.packageid is the field of a table where you want this number to be.

  • Roderik Latruwe Profile Picture
    85 on at

    oh if you want to see your number sequencei in inventparameters also add it to the 'loadmodule' method of the class: NumberSeqReference_Inventory

  • Munna Babu Profile Picture
    on at

    Hello Roderik, I need to generate a number sequence on a new module, it cannot be part of any other existing module.

    I tried all the solutions provided by many people on the internet.  But I could not succeed with any of the solution.

    Does anyone help me with complete and step by step process for generating Number sequence in a new module.

    I mean, creating a new module, creating a parameter table and form....and other classes and methods and their purpose...

    I am surprised that there is nothing available with all these details.  So I request if someone could help me.  Please this is very urgent...

  • Munna Babu Profile Picture
    on at

    Hi Martin, Do you have any white paper kind of thing to follow .....

  • Martin Dráb Profile Picture
    237,990 Most Valuable Professional on at

    Rather then requiring some other documentation than others use, it would be better to mention what parts of the existing documentation are not clear to you. We can't fix a problem if we don't know what it is.

  • Munna Babu Profile Picture
    on at

    1. Creating a New Module means what

    2. Why create parameter table and form are required and how to create them and their properties etc., to make a complete module

    3. Steps to follow for creating a Custom Number sequence (with code)

    4. Consuming that in our Custom Form. (with code)

    This is what I am looking for.

    Thanks in advance!!

  • Martin Dráb Profile Picture
    237,990 Most Valuable Professional on at

    1.and 2.: Creating a new module requires many steps - each module has it's own menu, structure or security keys, parameters etc. Regarding number sequences, you need a new element in NumberSeqModule enum, a new NumberSeqModule* (or NumberSeqReference_*) class, add it to NumberSeqReference.moduleList (AX2009 and older), provide a GUI (normally as the last tab in Parameters form) etc. Consult the documentation and other modules for details.

    3., 4.: What exactly is not clear to you? Even the code is in the documentation.

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
Priya_K Profile Picture

Priya_K 4

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans