Variables
- Change Global Variable GLEntryDim2 from normal to temporary
- Add global dimension DimMgt a Codeunit 408
Correct Error Message
Change Text Constant 16722
From: There is no A/L Posting Setup for this combination of A/L Posting Group and Global Dimensions. Identifiacation Fields and Values: A/L Posting Group = %1,Global Dimension 1 = %2,Global Dimension 2 = %3
To: A/L Posting setup cannot be found for %1: %2 and all possible A/L Setup Dimension combinations. Identification fields and values: %3:%4, %5:%6, %7:%8
Change Code for error message
Function CheckGenJnlLine
IF NOT CheckALPostingSetup(ALPostingGroup.Code,0,ALPostingSetup) // GR0001
THEN ERROR(Text16722,ALPostingGroup.Code, "Shortcut Dimension 1 Code","Shortcut Dimension 2 Code");
Change to
THEN ERROR(Text16722,ALPostingGroup.FIELDCAPTION(Code),ALPostingGroup.Code,FIELDCAPTION("Journal Template Name"),"Journal Template Name",FIELDCAPTION("Journal Batch Name"),"Journal Batch Name",FIELDCAPTION("Line No."),"Line No.");
Function CheckPurchaseLine
IF NOT CheckALPostingSetup(ALPostingGroup.Code,1,ALPostingSetup) // GR0001
THEN ERROR(Text16722,ALPostingGroup.Code, "Shortcut Dimension 1 Code","Shortcut Dimension 2 Code");
Change to
THEN ERROR(Text16722,ALPostingGroup.FIELDCAPTION(Code),ALPostingGroup.Code,FIELDCAPTION("Document Type"),"Document Type",FIELDCAPTION("Document No."),"Document No.",FIELDCAPTION("Line No."),"Line No.");
Function CheckSalesLine
IF NOT CheckALPostingSetup(ALPostingGroup.Code,2,ALPostingSetup) // GR0001
THEN ERROR(Text16722,ALPostingGroup.Code, "Shortcut Dimension 1 Code","Shortcut Dimension 2 Code");
Change to
THEN ERROR(Text16722,ALPostingGroup.FIELDCAPTION(Code),ALPostingGroup.Code,FIELDCAPTION("Document Type"),"Document Type",FIELDCAPTION("Document No."),"Document No.",FIELDCAPTION("Line No."),"Line No.");
Function CheckGLEntry
IF NOT CheckALPostingSetup(ALPostingGroup.Code,3,ALPostingSetup) // GR0001
THEN ERROR(Text16722,ALPostingGroup.Code, "Shortcut Dimension 1 Code","Shortcut Dimension 2 Code");
Change to
THEN ERROR(Text16722,ALPostingGroup.FIELDCAPTION(Code),ALPostingGroup.Code,FIELDCAPTION("Document Type"),"Document Type",FIELDCAPTION("Document No."),"Document No.",FIELDCAPTION("Entry No."),"Entry No.");
Change Code
Function CheckALPosting Setup
EntryType::"Sales Line": BEGIN
WITH DocDim DO BEGIN
SETRANGE("Table ID",39); a Change to 37
EntryType::"G/L Entry": BEGIN
WITH GLEntryDim2 DO BEGIN
SETRANGE("Table ID",81); a Change from 81 to “Table ID”
Function CheckGLEntry
CLEARALL;
GLEntryDim2 := JnlLineDim; // GR0000 a Delete line
GenJnlLine2 := GenJnlLine; // GR0000
Change to
CLEARALL;
GLEntryDim2.DELETEALL; a add
DimMgt.CopyJnlLineDimToJnlLineDim(JnlLineDim,GLEntryDim2); a add
GenJnlLine2 := GenJnlLine; // GR0000