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
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.
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
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?
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.
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.
I have another number sequence which is continuous,it concerns vouchers. The problem is same.
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.
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)
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.
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.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156