Skip to main content

Notifications

Microsoft Dynamics AX (Archived)

Continuous number sequence skipped number and record is not created.

Posted on by 612

Hello everyone,

I have a continuous number sequence which skipped a number and record is not created.  Automatic cleanup is not set.

How ever, I made a manual cleanup and the number sequence is not continuous anymore.  If I generate this sequence, will the missing records (which will contain skipped numbers in fields) be created or all records will be recreated? Shall I set this sequence as continuous or not?

Thanks for help in advance.

*This post is locked for comments

  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,253 Super User 2024 Season 2 on at
    RE: Continuous number sequence skipped number and record is not created.

    Hi Rati,

    Each and every number you need in the list, should be entered in the journal; so also old ones you need to reuse. It might also be possible to write a script to insert required numbers in the status list using e.g. a job with x++ coding.

  • Rati Sharabidze Profile Picture
    Rati Sharabidze 612 on at
    RE: Continuous number sequence skipped number and record is not created.

    Hi Andre,

    Sorry for late response. Yes it does appear in the status list,but there are far more IDs which are old and are not in status list. As I tested,it is possible by unchecking continuous and then rechecking it. But there is no such thing in the history of the number sequence. I also checked the stored procedures which are behind number sequences,and they are same.

    Best regards

  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,253 Super User 2024 Season 2 on at
    RE: Continuous number sequence skipped number and record is not created.

    Hi Rati,

    After you have deleted the line with a voucher, you should verify if the number is in the status list. Can you confirm that?

  • Rati Sharabidze Profile Picture
    Rati Sharabidze 612 on at
    RE: Continuous number sequence skipped number and record is not created.

    Hi Andre,

    Yes it is a voucher linked on a journal. I tried what you told me. It still takes the next value of the last(biggest) sequence, it does not take the first missing number.

  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,253 Super User 2024 Season 2 on at
    RE: Continuous number sequence skipped number and record is not created.

    Hi Rati,

    If you change it to continuous, it will be working for future records.

    If the missing number is not the latest used number, you can actually try the next trick:

    - Create a journal line where this number sequence is linked with the number that is missing. (or multiple lines for multiple vouchers) This when having manual enabled. (PS... it is a voucher used on a general journal or where else is it linked?)

    - Enable the continuous settings. (manual should be disabled then)

    - Delete the journal lines. It should create records for those numbers in the status list for this number sequence then.

    PS the Generate option is not creating number sequences for journals, only number sequences that are referenced on parameter forms.

  • Rati Sharabidze Profile Picture
    Rati Sharabidze 612 on at
    RE: Continuous number sequence skipped number and record is not created.

    I have another number sequence which is continuous,it concerns vouchers. The problem is same.

  • Rati Sharabidze Profile Picture
    Rati Sharabidze 612 on at
    RE: Continuous number sequence skipped number and record is not created.

    Hello,

    thank you for your response.

    It is voucher number sequence. I suddenly noticed that this sequence is manual. Maybe I did change it for testing in a test environment. If I reset it to Continuous,what will happen? I have not created any records during working.

  • Rati Sharabidze Profile Picture
    Rati Sharabidze 612 on at
    RE: Continuous number sequence skipped number and record is not created.

    Thank you for your response Martin,

    In "Generate" I meant 

    ccc.JPG

    Will "generate" insert skipped numbers or will it recreate all records?

    My main question is: Do I need to write a job which will insert records with missing numbers? (I have done manual cleanup)

  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,253 Super User 2024 Season 2 on at
    RE: Continuous number sequence skipped number and record is not created.

    Hi Rati,

    In addition: You haven't told us where this number sequence is used. So we can only provide the general comment about the use of continuous. Usually it is used for vouchers and invoice numbers or other documents where it is required or regulated.

    If you manually cleanup a sequence, it cannot change the setting to be not continuous anymore.

  • Suggested answer
    Martin Dráb Profile Picture
    Martin Dráb 230,188 Most Valuable Professional on at
    RE: Continuous number sequence skipped number and record is not created.

    I'll start from the end. Continuous number sequences are much more expensive performance-wise, therefore don't use them unless you have a really good reason.

    I don't understand what you mean by "If I generate this sequence...".

    You must realize that it's impossible to guarantee a continuous sequence if you don't allocate numbers on inserting.

    If you get an ID when initializing a record in a form, you may decide to not to save the record, the internet connection might go down (preventing the insertion) and so on. AX can fill these gaps later, but it can't prevent this situation.

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 Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans