Consistent Error During Posting

tejateja Member Posts: 78
Hi all

I created a new table.


When i tried posting from General Journal, It Should hit the created new table and table 17. When i posted the lines from General Journal it is showing an error.. i.e

The Transaction cannot be completed becoz it will cause inconsistencies in G/L Entry Table .
Check where and how the CONSISTENT Function Used in the transaction to find the reason for yhe error .
Contact your system manager if you need assistence.
Parts of the program mark tables as inconsistent during very comprehensive tasks,such as posting.This prevents data from being updated incorrectly


I was unable to follow to the next step after seeing this error.

Any suggestions

Thanks....

Comments

  • jannestigjannestig Member Posts: 1,000
    Sounds like your new table is creating the errors, what is the purpose of this extra table that it needs to interact with posting to gl ?

    If you can explain what you are trying to do perhap people can suggest a more appropriate method of acheiving your result.
  • KonradKonrad Member Posts: 30
    This error usualy maeans that General Journal lines you are trying to post do not balance. Check sum of amount fields.
  • tejateja Member Posts: 78
    hi

    The created table is Employee ledger entry. when i posted some lines from General Journal it should parallely to both table 17 and employee Ledger Entry. I tried creating a new function in CU-12 'postemp' as if there are 'postcust' and 'postvend'.

    I observed the code by runnig debugger. What I observed from debugger is , the lines are posting and status is showing that lines were poted 100%.The code in the codeunit-12 is runnig Error free, but again when it comes to codeunit-13 it breaks an Error showing the Consistent error.
  • KonradKonrad Member Posts: 30
    My guess is: every single line posts correctly, but when codeunit 13 commits whole transaction the balance is being checked and it returns error.
  • tejateja Member Posts: 78
    Yeah Konrad
    that its happening...


    I don't how to follow..


    Any Suggestions..
  • KonradKonrad Member Posts: 30
    There must be mistake in your journal lines, have them printed on screen before posting, check balance for transaction and every document number.
  • AlishaAlisha Member Posts: 217
    Go to codeunit 12 and look for the call to the function CONSISTENT, comment it out and run your process. This will post the lines without error, but if you check them afterwards you will see that the amounts don't match. This can help you to locate the problem...
  • kinekine Member Posts: 12,562
    see http://www.mibuso.com/forum/viewtopic.p ... 946#107946 for how to get more info about the problem...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • MalajloMalajlo Member Posts: 294
    See if you have a GL Entry No. 0 (zero). If you mass with editing GLEntries manually, then you can insert blank line. Delete it.

    If that is not the case, see previous link to post.
  • tejateja Member Posts: 78
    hi all,

    I already tried that link. By creating a new Codeunit. I didn't found any lines posted to table 17. but when i observed by running debugger, the table 17 is getting data from posted lines.

    The Error is striking
      IF GenJnlBatch."No. Series" <> '' THEN
        NoSeriesMgt.SaveNoSeries;
      IF NoSeries.FINDSET THEN
        REPEAT
          EVALUATE(PostingNoSeriesNo,NoSeries.Description);
          NoSeriesMgt2[PostingNoSeriesNo].SaveNoSeries;
        UNTIL NoSeries.NEXT = 0;
      IF GLSetupFound THEN
        GLSetup.MODIFY;
      COMMIT;
      CLEAR(GenJnlCheckLine);
      CLEAR(GenJnlPostLine);
    END;
    UpdateAnalysisView.UpdateAll(0,TRUE);
    COMMIT;
    


    This code is from codeunit-13 from trigger CODE. . To check The exact lines , they appear just before CHECKBALANCE trigger..
    Till COMMIT function it is running error free. But when cursur reaches COMMIT function it is displaying a CONSISTENT error..

    How to follow..
    Any suggestions....
  • kinekine Member Posts: 12,562
    Of course, because the CONSISTENCY error is working in this way. If somewhere is called CONSISTENT(False) and than there is some Commit, you will get this error. E.g. if CU is posting just entry to account without ballance account entry... or sum of posted amounts is not 0 etc...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.