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)
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

I have the same question (0)
  • Verified answer
    AXDeveloperJunior Profile Picture
    100 on at

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

  • dasdasd Profile Picture
    841 on at

    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.

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