Missing Number in a Continuous Number List

Microsoft Dynamics AX Forum

Rati Sharabidze picture

Continuous number sequence skipped number and record is not created.

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.

Replies (10)

Martin Dráb picture

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.

André Arnaud de Calavon picture

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.

Rati Sharabidze picture

Continuous number sequence skipped number and record is not created.

Thank you for your response Martin,

In "Generate" I meant

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)

Rati Sharabidze picture

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 picture

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.

André Arnaud de Calavon picture

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 picture

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 picture

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 picture

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 picture

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.

Martin Dráb picture

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.

smithadder1986.blogspot.com

Source: https://community.dynamics.com/ax/f/microsoft-dynamics-ax-forum/206763/continuous-number-sequence-skipped-number-and-record-is-not-created

0 Response to "Missing Number in a Continuous Number List"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel