Hello!
I have a problem unapplying customer entries, about which I posted another topic. I write this because something else happens in the same context and it looks odd (and could be the reason for my other problem)...
I'm using NAV 4SP3 IT based on SQL Server with a DB of about 10GB: If I unapply two customer entries, say a payment and an invoice, the transaction number assigned to the creation of the new payment is the same as some other previously used, maybe even performed by some other user... Is this normal? Shouldn't transaction numbers be unique? For instance, if I try to reverse the payment transaction, all other entries are included as well, which is not what one wants...
I had a similar problem on the same system when generating random numbers: A codeunit which worked on every other system did in fact always generate the same numbers within a short timespan (I didn't solve the problem, I found a workaround).
Has any of you any idea of what's happening?
Thank you in advance!
PS: Users access the DB by first connecting via terminal server to one PC where the client is installed. The SQL Server resides on another PC
0
Comments
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Kine, thanks for your prompt reply. Sorry if I didn't express myself properly: I've been a "normal" developer long before becoming a "NAV" developer, so I know that machines can't generate real random numbers and I know some algorithms to generate them from a seed: Fortunately that's not issue today, nor was it when I met the first "issue" on the system I mentioned: using random numbers was just a trick, so I decided to to it the clean way, instead. I still don't need random numbers...
The reason why I mentioned random numbers in my post is the way transaction numbers are generated in NAV: In the system I'm having issues with, there's apparently no criterion in their order (later entries have lower transaction numbers and vice versa), so I thought they were generated randomly (otherwise, I can't find the codeunit which generates them). And here lies the problem: at least when I unapply customer entries, already used Transaction Numbers are reused when creating the new entries... Is this normal or shouldn't they be globally unique? This repetition causes problems I posted in another topic...
Does any of you have any idea of what might be happening? Or do you know the codeunit which generates transaction numbers?
Thanks again in advance!
Ok, the Transaction No. is generated in the InitCodeunit function of the Codeunit 12. It will find last GL Entry and take the transaction no. +1 from this entry. it means it would be continuous growing row if all is going well, each posting have own transaction no. If it is not true, there is some way when this number is cleared or the InitCodeunit function is not called etc.
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Hm, not called... I guess that's why I didn't find where the number is generated...
Thank you very very much, I'll take a look!