{"title":"Codeunit 17 Gen. Jnl.-Post Reverse, extension points 29","url":"https://jonas-paprotka.de/ref/codeunit/17-gen-jnl-post-reverse/points/","author":"JOP-AL","license":"Metadata from Microsoft's symbol packages. AL source MIT, Copyright (c) Microsoft Corporation. Selection and wording © 2026 JOP-AL. https://jonas-paprotka.de/licenses/","subject":"Microsoft Dynamics 365 Business Central","checked":"2026-11-20","changed":"2026-10-05","object":{"type":"codeunit","id":17,"name":"Gen. Jnl.-Post Reverse","app":"Base Application","url":"https://jonas-paprotka.de/ref/codeunit/17-gen-jnl-post-reverse/"},"major":29,"source":{"url":"https://jonas-paprotka.de/ref/codeunit/17-gen-jnl-post-reverse/source/","path":"src/Layers/W1/BaseApp/Finance/GeneralLedger/Reversal/GenJnlPostReverse.Codeunit.al","commit":"4303e5e584d3aa5d9e98cbc615525a5396ad6ed7","lines":"a line is <source url>#L<line>"},"steps":{"event":"[line, \"event\", name, handled]: raises an event of this object; handled 1 when it has an IsHandled parameter","call":"[line, \"call\", name, arguments]: calls a procedure of this object","ext":"[line, \"ext\", type, id, name, arguments]: calls a procedure of another object, through a variable declared with that type","write":"[line, \"write\", table id, method, 1 when called with true]: Insert, Modify, ModifyAll, Delete, DeleteAll or Rename","validate":"[line, \"validate\", table id, field name]","run":"[line, \"run\", type, id]: Codeunit.Run, Page.Run, Report.Run and their kin"},"objects":{"table:179":{"name":"Reversal Entry","url":"https://jonas-paprotka.de/ref/table/179-reversal-entry/"},"table:2000000026":{"name":"Integer","url":"https://jonas-paprotka.de/ref/table/2000000026-integer/"},"codeunit:12":{"name":"Gen. Jnl.-Post Line","url":"https://jonas-paprotka.de/ref/codeunit/12-gen-jnl-post-line/"},"codeunit:5600":{"name":"FA Insert Ledger Entry","url":"https://jonas-paprotka.de/ref/codeunit/5600-fa-insert-ledger-entry/"},"table:45":{"name":"G/L Register","url":"https://jonas-paprotka.de/ref/table/45-g-l-register/"},"codeunit:410":{"name":"Update Analysis View","url":"https://jonas-paprotka.de/ref/codeunit/410-update-analysis-view/"},"codeunit:6200":{"name":"Non-Deductible VAT","url":"https://jonas-paprotka.de/ref/codeunit/6200-non-deductible-vat/"},"table:17":{"name":"G/L Entry","url":"https://jonas-paprotka.de/ref/table/17-g-l-entry/"},"table:21":{"name":"Cust. Ledger Entry","url":"https://jonas-paprotka.de/ref/table/21-cust-ledger-entry/"},"table:25":{"name":"Vendor Ledger Entry","url":"https://jonas-paprotka.de/ref/table/25-vendor-ledger-entry/"},"table:5222":{"name":"Employee Ledger Entry","url":"https://jonas-paprotka.de/ref/table/5222-employee-ledger-entry/"},"table:271":{"name":"Bank Account Ledger Entry","url":"https://jonas-paprotka.de/ref/table/271-bank-account-ledger-entry/"},"table:379":{"name":"Detailed Cust. Ledg. Entry","url":"https://jonas-paprotka.de/ref/table/379-detailed-cust-ledg-entry/"},"table:380":{"name":"Detailed Vendor Ledg. Entry","url":"https://jonas-paprotka.de/ref/table/380-detailed-vendor-ledg-entry/"},"table:5223":{"name":"Detailed Employee Ledger Entry","url":"https://jonas-paprotka.de/ref/table/5223-detailed-employee-ledger-entry/"},"table:254":{"name":"VAT Entry","url":"https://jonas-paprotka.de/ref/table/254-vat-entry/"},"table:253":{"name":"G/L Entry - VAT Entry Link","url":"https://jonas-paprotka.de/ref/table/253-g-l-entry-vat-entry-link/"},"table:6845":{"name":"Spend Request To G/L Link","url":"https://jonas-paprotka.de/ref/table/6845-spend-request-to-g-l-link/"},"codeunit:408":{"name":"DimensionManagement","url":"https://jonas-paprotka.de/ref/codeunit/408-dimensionmanagement/"}},"procs":[{"name":"Reverse","line":80,"kind":"procedure","params":2,"steps":[[108,"event","OnBeforeReverse",1],[116,"ext","table",179,"CopyReverseFilters",8],[120,"call","GetRegisterNoForTransactionReversal",1],[124,"write",2000000026,"Insert"],[128,"event","OnReverseOnBeforeGetTransactionKey",0],[129,"call","GetTransactionKey",0],[130,"call","SaveReversalEntries",2],[136,"event","OnReverseOnBeforeStartPosting",0],[138,"ext","codeunit",12,"GetNextEntryNo",0],[139,"ext","codeunit",12,"StartPosting",1],[141,"ext","codeunit",12,"ContinuePosting",1],[143,"event","OnReverseOnAfterStartPosting",0],[145,"ext","codeunit",12,"SetGLRegReverse",1],[147,"call","CopyCustLedgEntry",2],[148,"call","CopyVendLedgEntry",2],[149,"call","CopyEmplLedgEntry",2],[150,"call","CopyBankAccLedgEntry",2],[156,"event","OnReverseOnBeforeReverseGLEntry",0],[157,"call","ReverseGLEntry",11],[164,"event","OnReverseOnBeforeCheckFAReverseEntry",1],[168,"ext","codeunit",5600,"CheckFAReverseEntry",1],[173,"ext","codeunit",5600,"CheckMaintReverseEntry",1],[176,"ext","codeunit",5600,"FinishFAReverseEntry",1],[187,"event","OnReverseOnBeforeFinishPosting",0],[189,"ext","codeunit",12,"FinishPosting",1],[191,"event","OnReverseOnAfterFinishPosting",0],[196,"write",45,"Modify"],[199,"call","DeleteReversalEntries",1],[202,"event","OnReverseOnBeforeUpdateAnalysisView",1],[204,"ext","codeunit",410,"UpdateAll",2],[206,"event","OnAfterReverse",0]]},{"name":"ReverseGLEntry","line":209,"kind":"procedure","access":"local","params":11,"steps":[[216,"event","OnReverseGLEntryOnBeforeLoop",0],[219,"call","CheckDimComb",6],[222,"ext","codeunit",5600,"InsertReverseEntry",5],[223,"ext","codeunit",12,"GetNextEntryNo",0],[224,"ext","codeunit",12,"GetNextTransactionNo",0],[230,"ext","codeunit",6200,"Reverse",2],[236,"ext","codeunit",12,"GetNextEntryNo",0],[237,"ext","codeunit",12,"GetNextTransactionNo",0],[245,"call","SetReversalDescription",2],[253,"write",17,"Modify"],[259,"write",17,"Modify"],[260,"event","OnReverseGLEntryOnBeforeInsertGLEntry",0],[261,"ext","codeunit",12,"InsertGLEntry",3],[262,"event","OnReverseGLEntryOnAfterInsertGLEntry",0],[267,"event","OnReverseGLEntryOnBeforeTempCustLedgEntryCheckDimComb",0],[268,"call","CheckDimComb",6],[271,"call","ReverseCustLedgEntry",5],[274,"event","OnReverseGLEntryOnAfterReverseCustLedgEntry",0],[275,"write",21,"Delete"],[279,"call","CheckDimComb",6],[282,"call","ReverseVendLedgEntry",5],[285,"event","OnReverseGLEntryOnAfterReverseVendLedgEntry",0],[286,"write",25,"Delete"],[290,"call","CheckDimComb",6],[292,"call","ReverseEmplLedgEntry",5],[295,"write",5222,"Delete"],[299,"call","CheckDimComb",6],[301,"call","ReverseBankAccLedgEntry",3],[302,"write",271,"Delete"],[304,"call","SpendRequestLinkedToGLEntry",1],[305,"call","ReverseSpendRequest",2],[307,"event","OnReverseGLEntryOnCaseElse",0],[310,"call","ReverseVAT",2],[311,"event","OnReverseGLEntryOnAfterReverseVAT",0],[314,"event","OnAfterReverseGLEntry",0]]},{"name":"ReverseCustLedgEntry","line":317,"kind":"procedure","access":"local","params":5,"steps":[[340,"ext","codeunit",12,"GetNextTransactionNo",0],[343,"call","SetReversalDescription",2],[352,"write",21,"Modify"],[359,"event","OnReverseCustLedgEntryOnBeforeModifyCustLedgerEntry",0],[360,"write",21,"Modify"],[361,"event","OnReverseCustLedgEntryOnBeforeInsertCustLedgEntry",0],[362,"write",21,"Insert"],[363,"event","OnReverseCustLedgEntryOnAfterInsertCustLedgEntry",0],[366,"event","OnReverseCustLedgEntryOnBeforeFindLastDetailedCustLedgEntry",0],[369,"event","OnReverseCustLedgEntryOnAfterAssignNextDtldCustLedgEntryEntryNo",0],[374,"event","OnReverseCustLedgEntryOnAfterDtldCustLedgEntrySetFilters",0],[381,"ext","table",379,"UpdateDebitCredit",1],[384,"ext","codeunit",12,"GetNextTransactionNo",0],[388,"event","OnReverseCustLedgEntryOnBeforeInsertDtldCustLedgEntry",1],[390,"write",379,"Insert",1],[391,"event","OnReverseCustLedgEntryOnAfterInsertDtldCustLedgEntry",0],[394,"call","ApplyCustLedgEntryByReversal",5],[396,"call","ApplyCustLedgEntryByReversal",5]]},{"name":"ReverseVendLedgEntry","line":400,"kind":"procedure","access":"local","params":5,"steps":[[422,"ext","codeunit",12,"GetNextTransactionNo",0],[425,"call","SetReversalDescription",2],[434,"write",25,"Modify"],[441,"write",25,"Modify"],[442,"event","OnReverseVendLedgEntryOnBeforeInsertVendLedgEntry",0],[443,"write",25,"Insert"],[444,"event","OnReverseVendLedgEntryOnAfterInsertVendLedgEntry",0],[453,"event","OnReverseVendLedgEntryOnAfterDtldVendLedgEntrySetFilters",0],[460,"ext","table",380,"UpdateDebitCredit",1],[463,"ext","codeunit",12,"GetNextTransactionNo",0],[467,"event","OnReverseVendLedgEntryOnBeforeInsertDtldVendLedgEntry",1],[469,"write",380,"Insert",1],[470,"event","OnReverseVendLedgEntryOnAfterInsertDtldVendLedgEntry",0],[473,"call","ApplyVendLedgEntryByReversal",5],[475,"call","ApplyVendLedgEntryByReversal",5]]},{"name":"ReverseEmplLedgEntry","line":479,"kind":"procedure","access":"local","params":5,"steps":[[492,"ext","codeunit",12,"GetNextTransactionNo",0],[495,"call","SetReversalDescription",2],[504,"write",5222,"Modify"],[511,"write",5222,"Modify"],[512,"event","OnReverseEmplLedgEntryOnBeforeInsertEmplLedgEntry",0],[513,"write",5222,"Insert"],[528,"ext","table",5223,"UpdateDebitCredit",1],[531,"ext","codeunit",12,"GetNextTransactionNo",0],[534,"event","OnReverseEmplLedgEntryOnBeforeInsertDtldEmplLedgEntry",0],[535,"write",5223,"Insert",1],[538,"call","ApplyEmplLedgEntryByReversal",5],[540,"call","ApplyEmplLedgEntryByReversal",5]]},{"name":"ReverseBankAccLedgEntry","line":551,"kind":"procedure","params":3,"steps":[[567,"ext","codeunit",12,"GetNextTransactionNo",0],[570,"call","SetReversalDescription",2],[578,"write",271,"Modify"],[584,"write",271,"Modify"],[585,"event","OnReverseBankAccLedgEntryOnBeforeInsert",0],[586,"write",271,"Insert",1]]},{"name":"ReverseVAT","line":595,"kind":"procedure","params":2,"steps":[[624,"ext","codeunit",6200,"Reverse",1],[625,"ext","codeunit",12,"GetNextTransactionNo",0],[628,"ext","codeunit",12,"GetNextVATEntryNo",0],[636,"event","OnReverseVATOnBeforeReversedVATEntryModify",0],[637,"write",254,"Modify"],[643,"event","OnReverseVATOnBeforeVATEntryModify",0],[644,"write",254,"Modify"],[645,"event","OnReverseVATEntryOnBeforeInsert",0],[646,"write",254,"Insert"],[647,"event","OnReverseVATEntryOnAfterInsert",0],[648,"ext","table",253,"InsertLink",2],[649,"ext","codeunit",12,"IncrNextVATEntryNo",0]]},{"name":"ReverseSpendRequest","line":653,"kind":"procedure","access":"local","params":2,"steps":[[663,"write",6845,"Insert"]]},{"name":"ApplyCustLedgEntryByReversal","line":674,"kind":"procedure","access":"local","params":5,"steps":[[680,"event","OnBeforeApplyCustLedgEntryByReversal",1],[690,"write",21,"Modify"],[691,"event","OnApplyCustLedgEntryByReversalOnAfterCustLedgEntryModify",0],[698,"ext","codeunit",12,"GetNextTransactionNo",0],[702,"event","OnApplyCustLedgEntryByReversalOnBeforeInsertDtldCustLedgEntry",1],[704,"write",379,"Insert",1],[707,"event","OnApplyCustLedgEntryByReversalOnAfterInsertDtldCustLedgEntry",0]]},{"name":"ApplyVendLedgEntryByReversal","line":710,"kind":"procedure","access":"local","params":5,"steps":[[723,"write",25,"Modify"],[724,"event","OnApplyVendLedgEntryByReversalOnAfterVendLedgEntryModify",0],[731,"ext","codeunit",12,"GetNextTransactionNo",0],[735,"event","OnApplyVendLedgEntryByReversalOnBeforeInsertDtldVendLedgEntry",1],[737,"write",380,"Insert",1],[738,"event","OnApplyVendLedgEntryByReversalOnAfterInsertDtldVendLedgEntry",0]]},{"name":"ApplyEmplLedgEntryByReversal","line":741,"kind":"procedure","access":"local","params":5,"steps":[[753,"write",5222,"Modify"],[760,"ext","codeunit",12,"GetNextTransactionNo",0],[763,"event","OnApplyEmplLedgEntryByReversalOnBeforeInsertDtldEmplLedgEntry",0],[764,"write",5223,"Insert",1]]},{"name":"CheckDimComb","line":777,"kind":"procedure","params":6,"steps":[[785,"event","OnBeforeCheckDimComb",1],[787,"ext","codeunit",408,"CheckDimIDComb",1],[788,"ext","codeunit",408,"GetDimCombErr",0],[795,"ext","codeunit",408,"CheckDimValuePosting",3],[796,"ext","codeunit",408,"GetDimValuePostingErr",0],[799,"event","OnAfterCheckDimComb",0]]},{"name":"CopyCustLedgEntry","line":802,"kind":"procedure","access":"local","params":2,"steps":[[809,"write",21,"Insert"]]},{"name":"CopyVendLedgEntry","line":813,"kind":"procedure","access":"local","params":2,"steps":[[820,"write",25,"Insert"]]},{"name":"CopyEmplLedgEntry","line":824,"kind":"procedure","access":"local","params":2,"steps":[[831,"write",5222,"Insert"]]},{"name":"CopyBankAccLedgEntry","line":835,"kind":"procedure","access":"local","params":2,"steps":[[842,"write",271,"Insert"]]},{"name":"SetReversalDescription","line":852,"kind":"procedure","params":2,"steps":[[856,"call","FilterReversalEntry",2]]},{"name":"FilterReversalEntry","line":881,"kind":"procedure","access":"local","params":2,"steps":[[937,"event","OnAfterFilterReversalEntry",0]]},{"name":"SaveReversalEntries","line":941,"kind":"procedure","access":"local","params":2,"steps":[[947,"event","OnBeforeSaveReversalEntries",1],[955,"write",179,"Insert"]]},{"name":"DeleteReversalEntries","line":959,"kind":"procedure","access":"local","params":1,"steps":[[965,"event","OnBeforeDeleteReversalEntries",1],[969,"write",179,"DeleteAll"]]}]}