Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

Alerts for Number sequence numbers running out

(0) ShareShare
ReportReport
Posted on by 11,627

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

  • Suggested answer
    Vilmos Kintera Profile Picture
    Vilmos Kintera 46,149 on at
    RE: Alerts for Number sequence numbers running out

    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;
  • syed baber Profile Picture
    syed baber 11,627 on at
    RE: Alerts for Number sequence numbers running out

    Thanks Ludwig.

  • Verified answer
    Ludwig Reinhard Profile Picture
    Ludwig Reinhard Microsoft Employee on at
    RE: Alerts for Number sequence numbers running out

    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
    syed baber 11,627 on at
    RE: Alerts for Number sequence numbers running out

    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.

  • Suggested answer
    Ludwig Reinhard Profile Picture
    Ludwig Reinhard Microsoft Employee on at
    RE: Alerts for Number sequence numbers running out

    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
    syed baber 11,627 on at
    RE: Alerts for Number sequence numbers running out

    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.

  • Ludwig Reinhard Profile Picture
    Ludwig Reinhard Microsoft Employee on at
    RE: Alerts for Number sequence numbers running out

    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

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,391 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,445 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans