{"title":"Codeunit 1250 Match General Journal Lines, extension points 29","url":"https://jonas-paprotka.de/ref/codeunit/1250-match-general-journal-lines/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":1250,"name":"Match General Journal Lines","app":"Base Application","url":"https://jonas-paprotka.de/ref/codeunit/1250-match-general-journal-lines/"},"major":29,"source":{"url":"https://jonas-paprotka.de/ref/codeunit/1250-match-general-journal-lines/source/","path":"src/Layers/W1/BaseApp/Bank/Reconciliation/MatchGeneralJournalLines.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:1250":{"name":"Bank Statement Matching Buffer","url":"https://jonas-paprotka.de/ref/table/1250-bank-statement-matching-buffer/"},"table:1251":{"name":"Text-to-Account Mapping","url":"https://jonas-paprotka.de/ref/table/1251-text-to-account-mapping/"},"codeunit:1251":{"name":"Record Match Mgt.","url":"https://jonas-paprotka.de/ref/codeunit/1251-record-match-mgt/"},"table:81":{"name":"Gen. Journal Line","url":"https://jonas-paprotka.de/ref/table/81-gen-journal-line/"},"codeunit:103":{"name":"Cust. Entry-Edit","url":"https://jonas-paprotka.de/ref/codeunit/103-cust-entry-edit/"},"codeunit:113":{"name":"Vend. Entry-Edit","url":"https://jonas-paprotka.de/ref/codeunit/113-vend-entry-edit/"}},"procs":[{"name":"OnRun","line":21,"kind":"trigger","steps":[[26,"call","Code",2],[29,"event","OnAfterOnRun",0]]},{"name":"Code","line":41,"kind":"procedure","params":2,"steps":[[50,"call","SetMatchLengthThreshold",1],[51,"call","SetNormalizingFactor",1],[52,"call","FillTempGenJournalLine",2],[53,"call","FindMatchingCustEntries",2],[54,"call","FindMatchingVendorEntries",2],[55,"call","SaveOneToOneMatching",2],[57,"call","FillTempGenJournalLine",2],[58,"call","FindAccountMappings",1],[61,"call","ShowMatchSummary",1]]},{"name":"FindMatchingCustEntries","line":64,"kind":"procedure","access":"local","params":2,"steps":[[68,"event","OnBeforeFindMatchingCustEntries",0],[74,"event","OnFindMatchingCustEntriesOnAfterCustLedgerEntrySetFilters",0],[77,"call","FindMatchingCustEntry",3]]},{"name":"FindMatchingCustEntry","line":81,"kind":"procedure","access":"local","params":3,"steps":[[89,"call","GetMatchScore",8],[91,"event","OnFindMatchingCustEntryOnAfterGetMatchScore",0],[93,"ext","table",1250,"AddMatchCandidate",5],[95,"event","OnFindMatchingCustEntryOnAfterMatch",0]]},{"name":"FindMatchingVendorEntries","line":99,"kind":"procedure","access":"local","params":2,"steps":[[108,"event","OnFindMatchingVendorEntriesOnAfterSetVendorLedgerEntryFilters",0],[111,"call","FindMatchingVendorEntry",3]]},{"name":"FindMatchingVendorEntry","line":115,"kind":"procedure","access":"local","params":3,"steps":[[123,"call","GetMatchScore",8],[127,"ext","table",1250,"AddMatchCandidate",5],[129,"event","OnFindMatchingVendorEntryOnAfterMatch",0]]},{"name":"FindAccountMappings","line":133,"kind":"procedure","access":"local","params":1,"steps":[[144,"call","GetAccountMapping",2],[148,"call","UpdateGenJnlLine",5],[151,"ext","table",1251,"GetAccountNo",1],[155,"ext","table",1251,"GetPaymentDocType",3],[157,"ext","table",1251,"GetDocTypeForPmt",2],[159,"call","UpdateGenJnlLine",5],[162,"call","CreateInvoiceLineFromPayment",4],[164,"ext","table",1251,"GetAccountNo",1]]},{"name":"GetAccountMapping","line":171,"kind":"procedure","access":"local","params":2,"steps":[[179,"ext","codeunit",1251,"Trim",1],[188,"ext","codeunit",1251,"Trim",1],[192,"event","OnGetAccountMappingOnBeforeCalculateStringNearness",1],[197,"ext","codeunit",1251,"CalculateStringNearness",4],[198,"ext","codeunit",1251,"Trim",1]]},{"name":"SaveOneToOneMatching","line":225,"kind":"procedure","access":"local","params":2,"steps":[[232,"event","OnSaveOneToOneMatchingOnBeforeTempBankStatementMatchingBufferFindSet",0],[237,"call","ApplyRecords",2]]},{"name":"ApplyRecords","line":241,"kind":"procedure","access":"local","params":2,"steps":[[250,"call","UpdateGenJnlLine",5],[252,"call","PrepareCustLedgerEntryForApplication",2],[257,"call","UpdateGenJnlLine",5],[259,"call","PrepareVendorLedgerEntryForApplication",2]]},{"name":"CreateInvoiceLineFromPayment","line":264,"kind":"procedure","access":"local","params":4,"steps":[[269,"call","GetNextAvailableLineNo",1],[272,"validate",81,"Amount"],[273,"validate",81,"Document Type"],[274,"validate",81,"Applies-to Doc. Type"],[275,"validate",81,"Applies-to Doc. No."],[276,"validate",81,"Bal. Account Type"],[277,"validate",81,"Bal. Account No."],[278,"validate",81,"Description"],[279,"write",81,"Insert",1]]},{"name":"UpdateGenJnlLine","line":282,"kind":"procedure","access":"local","params":5,"steps":[[289,"validate",81,"Document Type"],[290,"validate",81,"Account Type"],[291,"validate",81,"Account No."],[292,"validate",81,"Applies-to ID"],[294,"validate",81,"Currency Code"],[295,"validate",81,"Applied Automatically"],[296,"validate",81,"Description"],[297,"write",81,"Modify",1]]},{"name":"PrepareCustLedgerEntryForApplication","line":300,"kind":"procedure","params":2,"steps":[[304,"event","OnPrepareCustLedgerEntryForApplicationOnBeforeSetAmountToApply",0],[310,"run","codeunit",103]]},{"name":"PrepareVendorLedgerEntryForApplication","line":313,"kind":"procedure","access":"local","params":2,"steps":[[317,"event","OnPrepareVendorLedgerEntryForApplicationOnBeforeSetAmountToApply",0],[323,"run","codeunit",113]]},{"name":"FillTempGenJournalLine","line":326,"kind":"procedure","params":2,"steps":[[330,"write",81,"DeleteAll"],[342,"write",81,"Insert"]]},{"name":"ShowMatchSummary","line":346,"kind":"procedure","access":"local","params":1,"steps":[[365,"call","GetMatchLengthTreshold",0],[368,"event","OnShowMatchSummaryOnAfterSetFinalText",1]]},{"name":"GetMatchScore","line":373,"kind":"procedure","access":"local","params":8,"steps":[[383,"call","GetDescriptionMatchScore",5],[385,"call","GetDescriptionMatchScore",5],[387,"call","GetDescriptionMatchScore",5]]},{"name":"GetDescriptionMatchScore","line":398,"kind":"procedure","access":"local","params":5,"steps":[[406,"ext","codeunit",1251,"Trim",1],[407,"call","GetMatchLengthTreshold",0],[408,"call","GetNormalizingFactor",0],[411,"ext","codeunit",1251,"CalculateStringNearness",4],[415,"ext","codeunit",1251,"CalculateStringNearness",4],[419,"ext","codeunit",1251,"CalculateStringNearness",4],[423,"ext","codeunit",1251,"CalculateStringNearness",4]]}]}