Skip to main content

Notifications

Microsoft Dynamics AX (Archived)
Answered

How to use number sequence in X++ (Dynamics 365)

(0) ShareShare
ReportReport
Posted on by 100

I would like to learn how to create a new number sequence in an existing module. I don't want to associate it with a field table or form, only it will be used to write in a report, and by the web doesn't help me, but by code does.

Thanks.

*This post is locked for comments

  • dasdasd Profile Picture
    dasdasd 841 on at
    RE: How to use number sequence in X++ (Dynamics 365)

    In D365 number sequence is lot more similar to AX2012, all you need to do is to add below method in your numbersequence class.

    public NumberSeqModule numberSeqModule()

       {

           //Sales & Marketing Module

           return NumberSeqModule::CRM;

       }

    It is a method of numberSequence class, by overriding this method you can define your module in which you want to create your number sequence.

  • Verified answer
    AXDeveloperJunior Profile Picture
    AXDeveloperJunior 100 on at
    RE: How to use number sequence in X++ (Dynamics 365)

    The key is NumberSeq::newGetNum(LedgerParameters::numRefNumSeq()).num();

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…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Vahid Ghafarpour – Community Spotlight

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

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,979 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,848 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans