Editing posted documents

SogSog 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?
|Pressing F1 is so much faster than opening your browser|
|To-Increase|

Comments

  • DeepDeep Member Posts: 569
    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
    India
  • SogSog Member Posts: 1,023
    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.
    |Pressing F1 is so much faster than opening your browser|
    |To-Increase|
  • kinekine Member Posts: 12,562
    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...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • idiotidiot Member Posts: 651
    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 challenger
  • SogSog Member Posts: 1,023
    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 process
    |Pressing F1 is so much faster than opening your browser|
    |To-Increase|
  • matttraxmatttrax Member Posts: 2,309
    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.
  • SogSog Member Posts: 1,023
    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.
    |Pressing F1 is so much faster than opening your browser|
    |To-Increase|
  • matttraxmatttrax Member Posts: 2,309
    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.
Sign In or Register to comment.