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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Problem with creating a sequence of numbers

(0) ShareShare
ReportReport
Posted on by 843

Hello,

I am trying to create a sequence of numbers. I am performing the steps according to: https://dynamics365musings.com/develop-a-d365-number-sequence/
After running the code, the sequence does not appear in the Number Sequences section in CustParameters. Am I doing something wrong?

Thanks.

class:

class AccountNumberGlobal extends NumberSeqModuleCustomer
{
    public void loadModule()
    {
        NumberSeqDatatype datatype = NumberSeqDatatype::construct();

        datatype.parmDatatypeId(extendedTypeNum(AccountGlobalId));
        datatype.parmReferenceHelp("Global account number");
        datatype.parmWizardIsContinuous(false);
        datatype.parmWizardIsManual(NoYes::No);
        datatype.parmWizardIsChangeDownAllowed(NoYes::Yes);
        datatype.parmWizardIsChangeUpAllowed(NoYes::Yes);
        datatype.parmWizardHighest(999999);
        datatype.parmSortField(60);
        this.create(datatype);
    }
}
      

job:

class testclass
{
    public static void main(Args _args)
    {
        AccountNumberGlobal ang = new AccountNumberGlobal();
        ang.loadModule();
    }

}

I have the same question (0)
  • Suggested answer
    GirishS Profile Picture
    27,829 Moderator on at

    Hi Shooowtek,

    After running the class have you generated the number sequence under Organization administration >> Number Sequence >> Generate.

    Thanks,

    Girish S.

  • Shooowtek Profile Picture
    843 on at

    Hello,

    Yes. I generated, I still can't see the sequence in the list..

    Is there anything else I should do?

  • GirishS Profile Picture
    27,829 Moderator on at

    Have you checked the number sequence form ?

    Does the custom number sequence generating?

    Navigate to organization administration >>Number Sequence >> See whether custom number sequence is generated.

    Try running the runnable class again and add the debugger in load Module method of your custom number sequence class and see whether debugger is hitting.

    Thanks,

    Girish S.

  • Suggested answer
    Komi Siabi Profile Picture
    13,190 Most Valuable Professional on at

    Hi Shooowtek,

    On the number sequence wizard, did you see your new number sequence info log appear before you clicked the finish button?

    You might want to confirm that, you fully build your custom model, then run the job again, and regenerate.  

  • Shooowtek Profile Picture
    843 on at
    [quote user="Komi Siabi"]

    Hi Shooowtek,

    On the number sequence wizard, did you see your new number sequence info log appear before you clicked the finish button?

    You might want to confirm that, you fully build your custom model, then run the job again, and regenerate.  

    [/quote]

    Hello Komi Siabi,

    1. No, I can't see my new number sequence.

    2. Yes, my model has been fully built.

    Where should the sequence be visible first - in the wizard or in the list in CustParamters? 

  • GirishS Profile Picture
    27,829 Moderator on at

    Try rename the method to loadModule_Extension - Update the method name in runnable class and rerun them again.

    Thanks,

    Girish S.

  • Shooowtek Profile Picture
    843 on at
    [quote user="GirishS"]

    Have you checked the number sequence form ?

    Does the custom number sequence generating?

    Navigate to organization administration >>Number Sequence >> See whether custom number sequence is generated.

    Try running the runnable class again and add the debugger in load Module method of your custom number sequence class and see whether debugger is hitting.

    Thanks,

    Girish S.

    [/quote]

    After running the debugger, I can see that 'datatype' is 'no data selected'....

    Seq.png

  • GirishS Profile Picture
    27,829 Moderator on at

    I compare the code with the standard one. You seems to be missing one more line. Try adding that and check.

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

    Thanks,

    Girish S.

  • Shooowtek Profile Picture
    843 on at
    [quote user="GirishS"]

    I compare the code with the standard one. You seems to be missing one more line. Try adding that and check.

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

    Thanks,

    Girish S.

    [/quote]

    still not working..

  • Suggested answer
    André Arnaud de Calavon Profile Picture
    302,598 Super User 2026 Season 1 on at

    Hi Shooowtek,

    You can read my blog which explains what to do if the number sequence is not appearing on the number sequence tab in parameter forms.

    What to do when new number sequence references on parameter forms are missing? - Dynamicspedia

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…

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 673 Super User 2026 Season 1

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 673 Super User 2026 Season 1

#3
Abhilash Warrier Profile Picture

Abhilash Warrier 391 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans