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)

How to apply number sequence at table level

(0) ShareShare
ReportReport
Posted on by

Hello guys,

Number sequence functionality at form level is very common. By over-riding some of the methods of form and form's data source we can do it.

But i have a different requirement, i need number sequence to be automatically generated whenever i create new record in my table. Please let me know if anyone know about it.

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Martin Dráb Profile Picture
    237,795 Most Valuable Professional on at

    It's actually pretty easy (although details depend on what you're exactly doing and some cases are more complex).

    For example, this is how standard AX generates account numbers for one-time customers:

    numberSeq = NumberSeq::newGetNum(CustParameters::numRefOneTimeCustomerAccount());
    custTable.AccountNum = numberSeq.num();
        


  • Community Member Profile Picture
    on at

    Hello martin,  I have tried your solution already but my requirement is whenever we create new record in form the number sequence will be automatically generated. How we can do the same in a table when we create a new record in table.

  • Verified answer
    Martin Dráb Profile Picture
    237,795 Most Valuable Professional on at

    The code shows how to generate a new number from number sequence and assign it to a field. If you want to call it on insert(), just write the code in the insert() method.

    If you have some problem with "my" solution, you'll have to explain the problem before anybody can help you.

  • Community Member Profile Picture
    on at

    Thanks martin.. It's working.

  • Verified answer
    Community Member Profile Picture
    on at

    gautamax.blogspot.in/.../how-to-use-generated-number-sequence-at.html

    please check the link for solution

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