Codeunit 17 "Gen. Jnl.-Post Reverse"
Base Application · Microsoft.Finance.GeneralLedger.Reversal
Across versions
- BC23present
- BC241 events changed
- BC251 events added
- BC261 events removed
- BC27-28unchanged
- BC293 procedures added, 1 procedures removed
- BC30unchanged
Neighbourhood 9 connected objects and pages
Base Application · Microsoft.Finance.GeneralLedger.Reversal · BC23-30 · source at ea08af5e · facts from BC29
Properties
| Property | Value |
|---|---|
| TableNo | Gen. Journal Line |
| Permissions | TableData “G/L Entry” = rm, TableData “Cust. Ledger Entry” = rimd, TableData “Vendor Ledger Entry” = rimd, TableData “G/L Register” = rm, TableData “G/L Transaction” = rm, TableData “G/L Entry - VAT Entry Link” = rimd, TableData “VAT Entry” = rimd, TableData “Bank Account Ledger Entry” = rimd, Table… |
Events published
OnAfterFilterReversalEntry(var ReversalEntry: Record "Reversal Entry"; RecVar: Variant)(integration): Integration event raised after setting reversal entry filters to allow additional filter customization.OnReverseOnAfterStartPosting(var GenJournalLine: Record "Gen. Journal Line"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var GLRegister: Record "G/L Register"; var GLRegister2: Record "G/L Register")(integration): Integration event raised after starting the reversal posting process.OnAfterReverse(GLRegister: Record "G/L Register"; var GLRegister2: Record "G/L Register")(integration): Integration event raised after completing the entire reversal process.OnAfterReverseGLEntry(var GLEntry: Record "G/L Entry")(integration): Integration event raised after reversing a G/L entry to allow additional processing.OnBeforeReverse(var ReversalEntry: Record "Reversal Entry"; var ReversalEntry2: Record "Reversal Entry"; var IsHandled: Boolean)(integration): Integration event raised before starting the reversal process to allow custom validation or preprocessing.OnBeforeCheckDimComb(EntryNo: Integer; DimSetID: Integer; TableID1: Integer; AccNo1: Code[20]; TableID2: Integer; AccNo2: Code[20]; var IsHandled: Boolean; var DimensionManagement: Codeunit DimensionManagement)(integration): Integration event raised before validating dimension combinations to allow custom dimension validation logic.OnReverseGLEntryOnAfterInsertGLEntry(var GLEntry: Record "G/L Entry"; GenJnlLine: Record "Gen. Journal Line"; GLEntry2: Record "G/L Entry"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line")(integration): Integration event raised after inserting a reversed G/L entry.- subscribers: Codeunit 6245 “Sust. GL Reverse Subscriber” ReverseSustainabilityOnAfterReverseGLEntry
OnReverseGLEntryOnBeforeInsertGLEntry(var GLEntry: Record "G/L Entry"; GenJnlLine: Record "Gen. Journal Line"; GLEntry2: Record "G/L Entry"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line")(integration): Integration event raised before inserting a reversed G/L entry to allow modification.OnReverseGLEntryOnBeforeLoop(var GLEntry: Record "G/L Entry"; var GenJournalLine: Record "Gen. Journal Line"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line")(integration): Integration event raised before processing each G/L entry in the reversal loop.OnReverseGLEntryOnCaseElse(GLEntry2: Record "G/L Entry"; GLEntry: Record "G/L Entry"; GenJournalLine: Record "Gen. Journal Line"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var TempBankAccountLedgerEntry: Record "Bank Account Ledger Entry" temporary)(integration): Integration event raised when G/L entry reversal encounters an unhandled ledger entry type.OnReverseCustLedgEntryOnAfterDtldCustLedgEntrySetFilters(var DtldCustLedgEntry: Record "Detailed Cust. Ledg. Entry"; NextDtldCustLedgEntryEntryNo: Integer)(integration): Integration event raised after setting filters on detailed customer ledger entries for reversal processing.OnReverseCustLedgEntryOnAfterInsertCustLedgEntry(var NewCustLedgerEntry: Record "Cust. Ledger Entry"; CustLedgerEntry: Record "Cust. Ledger Entry"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line")(integration): Integration event raised after inserting a reversed customer ledger entry.OnReverseCustLedgEntryOnBeforeInsertCustLedgEntry(var NewCustLedgerEntry: Record "Cust. Ledger Entry"; CustLedgerEntry: Record "Cust. Ledger Entry"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line")(integration): Integration event raised before inserting a reversed customer ledger entry to allow modification.- subscribers: Codeunit 30311 “Shpfy Suggest Payments” ResetTransactionIdOnReverseCustLedgEntryOnBeforeInsertCustLedgEntry
OnReverseVATOnBeforeVATEntryModify(var VATEntry: Record "VAT Entry")(integration): Integration event raised before modifying a VAT entry during reversal processing.OnReverseVATOnBeforeReversedVATEntryModify(var ReversedVATEntry: Record "VAT Entry"; var VATEntry: Record "VAT Entry")(integration): Integration event raised before modifying a reversed VAT entry during reversal of reversal processing.OnReverseVendLedgEntryOnAfterDtldVendLedgEntrySetFilters(var DtldVendLedgEntry: Record "Detailed Vendor Ledg. Entry"; NextDtldVendLedgEntryEntryNo: Integer)(integration): Integration event raised after setting filters on detailed vendor ledger entries for reversal processing.OnReverseVendLedgEntryOnBeforeInsertVendLedgEntry(var NewVendLedgEntry: Record "Vendor Ledger Entry"; VendLedgEntry: Record "Vendor Ledger Entry"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line")(integration): Integration event raised before inserting a reversed vendor ledger entry to allow modification.OnReverseVendLedgEntryOnAfterInsertVendLedgEntry(var VendorLedgerEntry: Record "Vendor Ledger Entry")(integration): Integration event raised after inserting a reversed vendor ledger entry.OnReverseEmplLedgEntryOnBeforeInsertEmplLedgEntry(var NewEmployeeLedgerEntry: Record "Employee Ledger Entry"; EmployeeLedgerEntry: Record "Employee Ledger Entry")(integration): Integration event raised before inserting a reversed employee ledger entry to allow modification.OnReverseBankAccLedgEntryOnBeforeInsert(var NewBankAccLedgEntry: Record "Bank Account Ledger Entry"; BankAccLedgEntry: Record "Bank Account Ledger Entry"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line")(integration): Integration event raised before inserting a reversed bank account ledger entry to allow modification.OnReverseCustLedgEntryOnBeforeInsertDtldCustLedgEntry(var NewDtldCustLedgEntry: Record "Detailed Cust. Ledg. Entry"; DtldCustLedgEntry: Record "Detailed Cust. Ledg. Entry"; var IsHandled: Boolean; NewCustLedgerEntry: Record "Cust. Ledger Entry")(integration): Integration event raised before inserting a detailed customer ledger entry during reversal processing.OnReverseVendLedgEntryOnBeforeInsertDtldVendLedgEntry(var NewDtldVendLedgEntry: Record "Detailed Vendor Ledg. Entry"; DtldVendLedgEntry: Record "Detailed Vendor Ledg. Entry"; var IsHandled: Boolean; NewVendorLedgerEntry: Record "Vendor Ledger Entry")(integration): Integration event raised before inserting a detailed vendor ledger entry during reversal processing.OnReverseEmplLedgEntryOnBeforeInsertDtldEmplLedgEntry(var NewDetailedEmployeeLedgerEntry: Record "Detailed Employee Ledger Entry"; DetailedEmployeeLedgerEntry: Record "Detailed Employee Ledger Entry")(integration): Integration event raised before inserting a detailed employee ledger entry during reversal processing.OnReverseVATEntryOnBeforeInsert(var NewVATEntry: Record "VAT Entry"; VATEntry: Record "VAT Entry"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line")(integration): Integration event raised before inserting a reversed VAT entry to allow modification.OnReverseOnBeforeFinishPosting(var ReversalEntry: Record "Reversal Entry"; var ReversalEntry2: Record "Reversal Entry"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var GLRegister: Record "G/L Register")(integration): Integration event raised before finishing the posting process in reversal to allow final modifications.OnReverseOnBeforeStartPosting(var GenJournalLine: Record "Gen. Journal Line"; var ReversalEntry: Record "Reversal Entry"; var GLEntry: Record "G/L Entry"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line")(integration): Integration event raised before starting the posting process in reversal to allow preparation.OnReverseOnBeforeReverseGLEntry(var ReversalEntry2: Record "Reversal Entry"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var GenJournalLine: Record "Gen. Journal Line"; TempRevertTransactionNo: record "Integer"; var GLEntry2: Record "G/L Entry"; GLRegister: Record "G/L Register")(integration): Integration event raised before reversing G/L entries to allow preprocessing of the reversal operation.OnApplyCustLedgEntryByReversalOnBeforeInsertDtldCustLedgEntry(var NewDtldCustLedgEntry: Record "Detailed Cust. Ledg. Entry"; DtldCustLedgEntry: Record "Detailed Cust. Ledg. Entry"; var IsHandled: Boolean; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var NextDtldCustLedgEntryEntryNo: Integer)(integration): Integration event raised before inserting a detailed customer ledger entry during customer application by reversal.OnApplyCustLedgEntryByReversalOnAfterCustLedgEntryModify(var CustLedgerEntry: Record "Cust. Ledger Entry")(integration): Integration event raised after modifying a customer ledger entry during application by reversal.OnApplyVendLedgEntryByReversalOnBeforeInsertDtldVendLedgEntry(var NewDtldVendLedgEntry: Record "Detailed Vendor Ledg. Entry"; DtldVendLedgEntry: Record "Detailed Vendor Ledg. Entry"; var IsHandled: Boolean; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var NextDtldVendLedgEntryEntryNo: Integer)(integration): Integration event raised before inserting a detailed vendor ledger entry during vendor application by reversal.OnApplyVendLedgEntryByReversalOnAfterVendLedgEntryModify(VendorLedgerEntry: Record "Vendor Ledger Entry")(integration): Integration event raised after modifying a vendor ledger entry during application by reversal.OnApplyEmplLedgEntryByReversalOnBeforeInsertDtldEmplLedgEntry(var NewDetailedEmployeeLedgerEntry: Record "Detailed Employee Ledger Entry"; DetailedEmployeeLedgerEntry: Record "Detailed Employee Ledger Entry")(integration): Integration event raised before inserting a detailed employee ledger entry during employee application by reversal.OnReverseOnAfterFinishPosting(var ReversalEntry2: Record "Reversal Entry"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var GLRegister: Record "G/L Register"; GLRegister2: Record "G/L Register")(integration): Integration event raised after finishing the posting process in reversal operation.OnReverseOnBeforeCheckFAReverseEntry(var FALedgerEntry: Record "FA Ledger Entry"; var FAInsertLedgerEntry: Codeunit "FA Insert Ledger Entry"; var ReversalEntry2: Record "Reversal Entry"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var IsHandled: Boolean)(integration): Integration event raised before checking Fixed Asset reversal entries to allow custom validation.OnReverseVendLedgEntryOnAfterInsertDtldVendLedgEntry(var NewDetailedVendorLedgEntry: Record "Detailed Vendor Ledg. Entry"; DetailedVendorLedgEntry: Record "Detailed Vendor Ledg. Entry")(integration): Integration event raised after inserting a detailed vendor ledger entry during reversal processing.OnReverseOnBeforeGetTransactionKey(var ReversalEntry2: Record "Reversal Entry"; var TempIntegerAsRevertTransactionNo: Record "Integer" temporary)(integration): Integration event raised before determining transaction key for reversal processing.OnReverseGLEntryOnAfterReverseVendLedgEntry(var TempVendorLedgerEntry: Record "Vendor Ledger Entry" temporary; var GLEntry: Record "G/L Entry"; GLEntry2: Record "G/L Entry")(integration): Integration event raised after reversing vendor ledger entry in G/L entry processing.OnReverseOnBeforeUpdateAnalysisView(var IsHandled: Boolean)(integration): Integration event raised before updating analysis views to allow custom analysis view handling.OnReverseGLEntryOnAfterReverseVAT(GLEntry2: Record "G/L Entry"; GLEntry: Record "G/L Entry"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line")(integration): Integration event raised after reversing VAT entries in G/L entry processing.OnReverseGLEntryOnAfterReverseCustLedgEntry(var TempCustLedgerEntry: Record "Cust. Ledger Entry" temporary; var GLEntry: Record "G/L Entry"; GLEntry2: Record "G/L Entry")(integration): Integration event raised after reversing customer ledger entry in G/L entry processing.OnReverseCustLedgEntryOnAfterInsertDtldCustLedgEntry(var NewDetailedCustLedgEntry: Record "Detailed Cust. Ledg. Entry")(integration): Integration event raised after inserting a detailed customer ledger entry during reversal processing.OnApplyCustLedgEntryByReversalOnAfterInsertDtldCustLedgEntry(var NewDetailedCustLedgEntry: Record "Detailed Cust. Ledg. Entry"; CustLedgerEntry2: Record "Cust. Ledger Entry")(integration): Integration event raised after inserting a detailed customer ledger entry during customer application by reversal.OnAfterCheckDimComb(var DimensionManagement: Codeunit DimensionManagement)(integration): Integration event raised after completing dimension combination validation.OnBeforeSaveReversalEntries(var IsHandled: Boolean)(integration): Integration event raised before saving reversal entries to allow custom save processing.OnBeforeDeleteReversalEntries(var IsHandled: Boolean)(integration): Integration event raised before deleting reversal entries to allow custom deletion processing.OnApplyVendLedgEntryByReversalOnAfterInsertDtldVendLedgEntry(var NewDetailedVendorLedgEntry: Record "Detailed Vendor Ledg. Entry"; VendorLedgerEntry2: Record "Vendor Ledger Entry")(integration): Integration event raised after inserting a detailed vendor ledger entry during vendor application by reversal.OnReverseVATEntryOnAfterInsert(var NewVATEntry: Record "VAT Entry"; VATEntry: Record "VAT Entry"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line")(integration): Integration event raised after inserting a reversed VAT entry.OnReverseCustLedgEntryOnBeforeFindLastDetailedCustLedgEntry(var DetailedCustLedgEntry: Record "Detailed Cust. Ledg. Entry")(integration): Integration event raised before finding the last detailed customer ledger entry to allow custom entry number handling.OnReverseCustLedgEntryOnAfterAssignNextDtldCustLedgEntryEntryNo(var DetailedCustLedgEntry: Record "Detailed Cust. Ledg. Entry"; var NextDtldCustLedgEntryEntryNo: Integer)(integration): Integration event raised after assigning the next detailed customer ledger entry number.OnReverseGLEntryOnBeforeTempCustLedgEntryCheckDimComb(var GLEntry: Record "G/L Entry"; var TempCustLedgerEntry: Record "Cust. Ledger Entry" temporary)(integration): Integration event raised before checking dimension combinations for temporary customer ledger entry.OnBeforeApplyCustLedgEntryByReversal(CustLedgerEntry: Record "Cust. Ledger Entry"; CustLedgerEntry2: Record "Cust. Ledger Entry"; DetailedCustLedgEntry2: Record "Detailed Cust. Ledg. Entry"; AppliedEntryNo: Integer; var NextDtldCustLedgEntryEntryNo: Integer; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var IsHandled: Boolean)Δ BC24 (integration)OnReverseCustLedgEntryOnBeforeModifyCustLedgerEntry(NewCustLedgerEntry: Record "Cust. Ledger Entry"; var CustLedgerEntry: Record "Cust. Ledger Entry")+ BC25 (integration): Integration event raised before modifying a customer ledger entry during reversal processing.- subscribers: Codeunit 30311 “Shpfy Suggest Payments” ResetTransactionIdOnReverseCustLedgEntryOnBeforeModifyCustLedgerEntry
Procedures
Reverse(var ReversalEntry: Record "Reversal Entry"; var ReversalEntry2: Record "Reversal Entry"): Executes the reversal process for specified entries and creates offsetting transactions. Handles complete reversal workflow including G/L entries, subsidiary ledgers, and VAT entries.ReverseBankAccLedgEntry(BankAccountLedgerEntry: Record "Bank Account Ledger Entry"; NewEntryNo: Integer; SourceCode: Code[10]): Creates a reversal entry for a bank account ledger entry with opposite amounts and signs. Handles bank account transaction reversal and maintains proper audit trail.ReverseVAT(GLEntry: Record "G/L Entry"; SourceCode: Code[10]): Reverses VAT entries associated with a G/L entry by creating offsetting VAT transactions. Handles VAT reversal logic including unrealized VAT and non-deductible VAT amounts.CheckDimComb(EntryNo: Integer; DimSetID: Integer; TableID1: Integer; AccNo1: Code[20]; TableID2: Integer; AccNo2: Code[20]): Validates dimension combinations for reversal entries to ensure posting compliance. Checks both dimension set validity and dimension value posting restrictions.SetReversalDescription(RecVariant: Variant; var Description: Text[100]): Sets the description for a reversal entry based on the configured reversal entry description. Retrieves description from corresponding reversal entry record for the source record.
Plus 18 local procedures.
Triggers
OnRun
Relations
- runs on Table 81 “Gen. Journal Line”
Calls
From the extracted call graph of BC29 (graphify-al on the snapshot checkout): calls whose target is known from a declared type or an Object::"Name" argument. Interface dispatch and calls through events are not counted, so the list is not complete.
- Codeunit 12 “Gen. Jnl.-Post Line” (18 calls:
ApplyCustLedgEntryByReversal → GetNextTransactionNo,ApplyEmplLedgEntryByReversal → GetNextTransactionNo,ApplyVendLedgEntryByReversal → GetNextTransactionNo, …) - Codeunit 408 “DimensionManagement” (4 calls:
CheckDimComb → CheckDimIDComb,CheckDimComb → CheckDimValuePosting,CheckDimComb → GetDimCombErr, …) - Codeunit 5600 “FA Insert Ledger Entry” (4 calls:
Reverse → CheckFAReverseEntry,Reverse → CheckMaintReverseEntry,Reverse → FinishFAReverseEntry, …) - Codeunit 6200 “Non-Deductible VAT” (2 calls:
ReverseGLEntry → Reverse,ReverseVAT → Reverse) - Codeunit 410 “Update Analysis View” (1 call:
Reverse → UpdateAll)
Called by
- Codeunit 5600 “FA Insert Ledger Entry” (2 calls:
SetFAReversalMark → SetReversalDescription,SetMaintReversalMark → SetReversalDescription) - Codeunit 179 “Reversal-Post” (1 call:
OnRun → Reverse)
Recent changes
- 2026-08-16 #9067 Production Definition Wizard - Implementation (main, BC30, feature)
- 2026-08-10 #9391 [Master] - Slice 616928: [Expense Management] [App part] Expense Managements Travel Requisitions 💸 (main, BC30, feature)
- 2026-07-31 #8959 Deliverable 638799: Spend Requests in Base App (main, BC30, feature)
- 2026-07-25 #9455 Update permissions for G/L Transaction table (main, BC30, fix)
Countries that replace it
Source: AL metadata extracted from the code (names, ids, signatures, properties); no code bodies (D10).
Ask your agent
Procedure bodies are not stored here (D10). The call sections above are our own, per object, from the BC29 call graph. For a procedure body or the calls of one procedure, ask bc-code-atlas (external, by Stefan Maron, MIT; default corpus w1-28), which the bc-observatory plugin connects: bcatlas_resolve_node(object_type: "codeunit", object_name: "Gen. Jnl.-Post Reverse"), then bcatlas_get_procedure_body or bcatlas_get_neighbors on the returned id.