Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Create new number sequence in AX

(0) ShareShare
ReportReport
Posted on by 1,547

Hi Friends,

I am trying to add a new number sequence.

Here are steps I found on web to generate a new one.

1. create EDT: GroupId

2. modify method 'loadModule' in existing NumberSeqReference_xxx class. Save and compile it.

    numRef.DataTypeId               =   typeId2ExtendedTypeId(GroupId));
    numRef.ReferenceHelp            =   literalstr("Group ID");
    numRef.WizardManual             =   NoYes::No;
    numRef.WizardAllowChangeDown    =   NoYes::No;
    numRef.WizardAllowChangeUp      =   NoYes::No;
    numRef.SortField                =   7;
    this.create(numRef);

But, when I go to number sequence wizard, I don't see it.

I guess I missed a step somewhere.

It's confused to me that how this works. It looks I can manually create a new one in Number Sequence form.

Any help is appreciated.

*This post is locked for comments

  • Verified answer
    Ganriver1 Profile Picture
    Ganriver1 1,547 on at
    RE: Create new number sequence in AX

    I made it work.

    What I did is add following method in modul's parameter setup table.

    static client server NumberSequenceReference numRefGroupID()

    {

       return NumberSeqReference::findReference(typeId2ExtendedTypeId(typeid(GroupId)));

    }

  • Suggested answer
    Ajit Profile Picture
    Ajit 8,755 on at
    RE: Create new number sequence in AX

    AX 2009 - 

    static void LoadModule(Args _args)
    {
    NumberSeqReference_Customer numSeqCustomer;

    numSeqCustomer = new NumberSeqReference_Customer(NumberSeqModule::Cust);
    numSeqCustomer.load();
    }

    AX 2012 -

    static void LoadModule(Args _args)
    {
    NumberSeqModuleCustomer numSeqModuleCustomer = new NumberSeqModuleCustomer();
    numSeqModuleCustomer.load();
    }

    Note - Change 'NumberSeqModuleCustomer' class with your class.

  • Ganriver1 Profile Picture
    Ganriver1 1,547 on at
    RE: Create new number sequence in AX

    Hi Vilmos,

    Looks like AX 2009 works differently. I couldn't load it.

  • Suggested answer
    Vilmos Kintera Profile Picture
    Vilmos Kintera 46,149 on at
    RE: Create new number sequence in AX

    First of all the Extended Data Type which you are using be more specific rather than using a very generic one that many other EDTs might be exntending. Make your own EDT preferably.

    Then you also need to load the module.

    Try this to load all modules, I am unsure if it is available for 2009 as well though:

    msdn.microsoft.com/.../numberseqapplicationmodule.loadall.aspx

    If it does not work, you could load the specific module yourself as shown in the example for the AX 2012 documentation. "Loading Number Sequence Information for a Module" part:

    msdn.microsoft.com/.../aa608474.aspx

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,494 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,305 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans