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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Alerts for Number sequence numbers running out

(0) ShareShare
ReportReport
Posted on by 11,633

Hi All,

Is there a way to get alerts when any number sequence is running out of number or less than 10% or 20% left ? I have setup client's Production environment in LCS and there it tells me if any number sequence is running out and less than 20% left. But my client wants an email alert to be sent so that they don't have to check LCS diagnostic report regularly. 

Please let me know if there is a standard configuration exists to achieve this functionality.

Thanks,

Baber.

*This post is locked for comments

I have the same question (0)
  • Ludwig Reinhard Profile Picture
    Microsoft Employee on at

    Hello Baber,

    Just wondering how number sequences can run out? Isn't it that once can assign up to 20 numbers in a sequence? What is the intention of the user if a number sequence comes to an end? Replace it with a new one?

    Best regards,

    Ludwig

  • syed baber Profile Picture
    11,633 on at

    Hi Ludwig,

    I meant to say that the maximum limit for any number sequence is about to reach, then we need an alert that says, less than 20% numbers are left before it runs out. So that we can go and increase the limit. Hope you understand my point.

    Thanks,

    Baber.

  • Suggested answer
    Ludwig Reinhard Profile Picture
    Microsoft Employee on at

    Hello Baber,

    Got your point.

    Yet, I am wondering why you don't set the limit to a number that you won't reach in the next 10 years or so? Then you don't have to worry about alerts ;-)

    Best regards,

    Ludwig

  • syed baber Profile Picture
    11,633 on at

    Hi Ludwig,

    Thanks for your suggestion. I will advise this. Not sure why the number sequence is setup to small limit like 5 digits initially. The maximum limit we can set is up to 10 digits, right ? Based on the maximum limit for an Integer.

  • Verified answer
    Ludwig Reinhard Profile Picture
    Microsoft Employee on at

    Hello Barber,

    I think the default is 9 numbers, which allows you creating more than 999 million transactions.

    Should be sufficient for most companies :-)

    Best regards,

    Ludwig

  • syed baber Profile Picture
    11,633 on at

    Thanks Ludwig.

  • Suggested answer
    Vilmos Kintera Profile Picture
    46,149 on at

    Hi

    We have set up e-mail notifications for our number sequences as a SQL Job.

    It is running weekly, and I get an early heads-up for number sequences that have consumed at least 70% of their allocated range. I will post a blog entry later today about this, but here is the source code.

    EXEC msdb.dbo.sp_send_dbmail
        @recipients = 'youremail@addr.ess',
        @subject = 'Number sequences consumed above threshold',
        @profile_name = 'SQLEMAILPROFILENAME',
        @attach_query_result_as_file=0,
        @query_attachment_filename = 'numberseq_PROD.csv',
        @query_result_separator = ';',
        @execute_query_database = 'YOURAXDATABASE',
        @query = 'SELECT [NUMBERSEQUENCE]
          ,[TXT]
          ,[LOWEST]
          ,[HIGHEST]
          ,[NEXTREC]
      FROM [YOURAXDATABASE].[dbo].[NUMBERSEQUENCETABLE]
      where (NEXTREC - LOWEST) >= (HIGHEST - LOWEST) * 0.7;',
        @query_result_header = 1,
        @exclude_query_output = 1,
        @query_result_width =500;

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Joris dG Profile Picture

Joris dG 5

#2
Sagar Suman Profile Picture

Sagar Suman 2 Super User 2026 Season 1

#2
Alexey Lekanov Profile Picture

Alexey Lekanov 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans