Editing posted documents
Sog
Member Posts: 1,023
I'm currently trying to improve the posting process. And although codeunit 80, 90 work perfectly they are large and put a lock on tables very early in the process. So I'm sure I have to rewrite them to keep locks down to a minimum. (ie as late as possible so users won't be locked out so often)
I've tried to alter and insert new lines directly into posting tables but (although the insert does not suprise me) the db loses consitency when altering an invoice line. The g/l entries, vat entries, (detailed) customer/vendor ledger entries and value entries don't automaticly change with my alteration.
Now I was wondering if anybody has already rewritten those cu's or if somebody has code that would update all the related tables when altering an invoice line?
I've tried to alter and insert new lines directly into posting tables but (although the insert does not suprise me) the db loses consitency when altering an invoice line. The g/l entries, vat entries, (detailed) customer/vendor ledger entries and value entries don't automaticly change with my alteration.
Now I was wondering if anybody has already rewritten those cu's or if somebody has code that would update all the related tables when altering an invoice line?
0
Comments
-
Editing posted documents is the worst thing which can lead to data inconsistency.
You should work towards performance tuning rather than customizing to edit posting documents.
Table locking error is minimized to a great extent when using SQL databases.Regards,
Deep
India0 -
I'm know the risks. That's why it is in a testing environment.
But I know it is possible to rewrite the posting cu's, I've heard someone mention it that he has done it for a client.
I know my source is trustworthy. But nonetheless I would like to first have code that will enable me to alter my posted documents while keeping it consistent so I have a reference to check if my cu will run without errors or bugs while upping the performance.
And even though sql gives less tablelocks, in a single company with + 50 users table locks still appear frequently.
That's why the posting should be more performant.
Referals to companies who have the knowledge might be handy for other people who face a similar performance problem.
So if you know any, you can post them here.0 -
And did you tried to do all what you can to make the posting process as fast as possible without re-writing the code? It is not problem to have one order posted in one second with many lines if the application is optimized for the specific usage...0
-
It can be done, but your Nav becomes proprietary & no other partner will be willing to supporting you anymore & becomes non-upgradable. The costs will be huge as well. Is it worth it? Why not get another software?NAV - Norton Anti Virus
ERP Consultant (not just Navision) & Navision challenger0 -
That's not a problem actually.
The proprietary problem is a problem for my boss.
The version is 5.0 SP1 so an upgrade to 2009 is no matter what a big job.
Local updates is something we can handle.
AX was something we have thought about, but apparently the costs of implementing are higher then rewriting the posting process0 -
I guess I'm confused. The idea of posting something means that it is final. It stays that way forever and ever.
If the user is posting incorrect documents, then they need training or to have someone look over their work before they post.
If an invoice does get posted incorrectly, do a credit memo. The Copy Document feature makes it incredibly easy to "undo" what you did before. Less than a minute.
If you are experiencing that much table locking I would, as the others suggested, go for performance tuning on the SQL end first. You can also setup a job scheduler with NAS to batch post your documents at night when no one is working.
Point is, there are A LOT of things you should try first, before trying to alter posted ledger entries. It will really lead to nothing but trouble when you realize you forgot that one test case and the auditors are checking your books.0 -
I appreciate your all of your concerns, I understand the consequences of altering the posting process, and I would love it to not do it (And not just for the huge amount of work) but it's not my call.0
-
Have you investigated how the Navigate function works? You should be able to copy that code to figure out what ledger entries need to be modified. I don't think I would go through the Codeunits because those are designed to create new entries, not modify existing ones.
I realize Navigate is intended to work on the header and not specific lines, but it could probably be customized to do so. That's where I would start anyway.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 333 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 991 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

