Mismatch: Value Entry/Item Ledger Entry No. - Document No. NAV2015

jsinisa
Member Posts: 27
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?
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?
0
Best Answer
-
The timestamp is an internal number inside SQL Server, with no meaning. It gets increased every time a write operation on any record in any table in any database is performed, each time a record gets updated it receives new timestamp value.
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.Slawek Guzek
Dynamics NAV, MS SQL Server, Wherescape RED;
PRINCE2 Practitioner - License GR657010572SG
GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-035
Answers
-
The timestamp is an internal number inside SQL Server, with no meaning. It gets increased every time a write operation on any record in any table in any database is performed, each time a record gets updated it receives new timestamp value.
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.Slawek Guzek
Dynamics NAV, MS SQL Server, Wherescape RED;
PRINCE2 Practitioner - License GR657010572SG
GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-035 -
OK, I can get that.
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 Slawek0 -
No, it is not. It would be if you only inserted new records into Value Entry and never updated any. Each update operation refreshes the timestamp value in the record.
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, ASlawek Guzek
Dynamics NAV, MS SQL Server, Wherescape RED;
PRINCE2 Practitioner - License GR657010572SG
GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-030 -
OK, I see.
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:
0 -
All postings are in order of Entry No.
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.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions