Wednesday, August 5, 2015

Dynamics NAV - LS Retail - Statements do not post correctly - "The Transaction cannot be completed because it will cause Inconsistencies" error

Cause
The statement has not been correctly calculated. Some information is missing or damaged.

Resolution
  • Clear and Recalculate the statement
  • If you cannot do this because you have posted Sales Documents already, do the following
    • In the DEV environment Run Table 99001487 Statement
    • Find your problem statement
    • Clear the Status Field so it no longer has  "Sales Entries Posted"
    • Navigate to your Statement in NAV
    • Clear and Recalculate the statement
    • DO NOT RE-POST SALES TRANSACTIONS
Resolution2
Save this as text, and import and compile
OBJECT Codeunit 50004 Single Instance CU { OBJECT-PROPERTIES { Date=10/11/07; Time=[ 2:50:02 PM]; Modified=Yes; Version List=MOD01; } PROPERTIES { SingleInstance=Yes; OnRun=BEGIN IF NOT StoreToTemp THEN BEGIN StoreToTemp := TRUE; END ELSE FORM.RUNMODAL(0,TempGLEntry); END; } CODE { VAR TempGLEntry@1000000000 : TEMPORARY Record 17; StoreToTemp@1000000001 : Boolean; PROCEDURE InsertGL@1000000000(GLEntry@1000000000 : Record 17); BEGIN IF StoreToTemp THEN BEGIN TempGLEntry := GLEntry; IF NOT TempGLEntry.INSERT THEN BEGIN TempGLEntry.DELETEALL; TempGLEntry.INSERT; END; END; END; BEGIN END. } }

  • Run this codeunit once
  • Run your problem posting
  • Run this codeunit again to see the cause

No comments:

Post a Comment