Hi all,
here one strange case.
as you can see timestamp follows Entry No.: bigger timestamp -> bigger Entry No. This is OK.
but, if you look at Document No. then it is strange. Earlier created Item Ledger Entry has "later" Document No. Documents BL**** are Posted Sales Shipments.
If I look at Value Entries for these Item Ledger Entries, I can see that Sales Invoice No's follow timestamp and Entry No., but Shipments not:
How is that possible? What is possible scenario for that behavior?
Answers
If you only wrote records to the Value Entry table the timestamp order would follow the Entry No. order, but the minute you modify an existing Value Entry the modifed record receives new timestamp value, even if nothing really changed on it.
Dynamics NAV, MS SQL Server, Wherescape RED;
PRINCE2 Practitioner - License GR657010572SG
GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
Then it is the same with Entry No.'s?
I saw right now that some Adjustments were done where latest Invoice was adjusted first and so on.
That explains everything
Thank you Slawek
By ordering by timestamp you are effectively getting records in order of physical write operations performed on them (both writes count; the first write when a record is inserted and subsequent when it is modified)
If you Inserted record A, inserted record B, modified record A then the Entry No order would be A, B, but the timestamp order would be B, A
Dynamics NAV, MS SQL Server, Wherescape RED;
PRINCE2 Practitioner - License GR657010572SG
GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
No, Entry No.s are fixed and do not change if/when you modify the record.
But, then is question again how is possible that sequence for Posted Sales Shipment (Documents BL...) is not following Entry No.'s? Not in ILE, not in Value Entry.
According to NoSeries, BL18-04716 must have been created before BL18-04846 (Posting Date also shows that).
Still, earlier Entry No. in ILE for Item HSU-004362 has Posting Date and Document No. later on.
Then it must be the case, that Adjustment has updated Posting Date and Document No in ILE with Entry No. 560264?
Here how it looks:
It is possible to post one document with a posting date and then post the next document with an earlier posting date so these won’t just be increasing along with Entry no.s
Value Entries can be posted as part of cost adjustments so this is one reason why document no.s are not always in order there (they post with the original document no.)
Sales/purchase documents get allocated a posted no. early in the posting routine but an error may occur in the posting in which case the posted no. is still allocated (eg 1000) but the document and ledger entries are not posted. The next document that gets posted will get the next no. (eg 1001j. I.e you get 999 posted then 1000 posted. In this scenario the document allocated 1000 still hasn’t been posted and maybe posted days later causing the document no.s to be posted out of sequence in the ledger tables. This affects all the Ledger tables, including item ledger entry and value entry.