CFLChangeDimensionRelatedTables Procedure
Changes the dimension set ID on posted G/L entries for a specific document. Updates both the main transaction amount and VAT amount entries if applicable. Also updates the global dimension codes to match the new dimension set.
Signature
CFLChangeDimensionRelatedTables(DocNo: code[20]; PostingDate: date; oldDimSetID: integer; NewDimSetID: integer; DocAmount: Decimal; GLAccount: code[20]; VATAmount: decimal; VATAccount: code[20])
Parameters
DocNo code[20]
The document number to filter G/L entries.
PostingDate date
The posting date to filter G/L entries.
oldDimSetID integer
The current dimension set ID to find and replace.
NewDimSetID integer
The new dimension set ID to apply.
DocAmount Decimal
The document amount to identify the correct G/L entry (positive or negative).
GLAccount code[20]
The G/L account number for the main transaction.
VATAmount decimal
The VAT amount (0 if no VAT entry should be updated).
VATAccount code[20]
The G/L account number for the VAT transaction.
Remarks
This procedure modifies posted G/L entries, which is typically restricted. Use with caution and ensure proper authorization and audit trails.