{"title":"Codeunit 1252 Match Bank Rec. Lines, extension points 29","url":"https://jonas-paprotka.de/ref/codeunit/1252-match-bank-rec-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":1252,"name":"Match Bank Rec. Lines","app":"Base Application","url":"https://jonas-paprotka.de/ref/codeunit/1252-match-bank-rec-lines/"},"major":29,"source":{"url":"https://jonas-paprotka.de/ref/codeunit/1252-match-bank-rec-lines/source/","path":"src/Layers/W1/BaseApp/Bank/Reconciliation/MatchBankRecLines.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":{"codeunit:375":{"name":"Bank Acc. Entry Set Recon.-No.","url":"https://jonas-paprotka.de/ref/codeunit/375-bank-acc-entry-set-recon-no/"},"table:1299":{"name":"Payment Matching Details","url":"https://jonas-paprotka.de/ref/table/1299-payment-matching-details/"},"table:274":{"name":"Bank Acc. Reconciliation Line","url":"https://jonas-paprotka.de/ref/table/274-bank-acc-reconciliation-line/"},"codeunit:376":{"name":"Check Entry Set Recon.-No.","url":"https://jonas-paprotka.de/ref/codeunit/376-check-entry-set-recon-no/"},"codeunit:8703":{"name":"Feature Telemetry","url":"https://jonas-paprotka.de/ref/codeunit/8703-feature-telemetry/"},"table:273":{"name":"Bank Acc. Reconciliation","url":"https://jonas-paprotka.de/ref/table/273-bank-acc-reconciliation/"},"codeunit:27":{"name":"Confirm Management","url":"https://jonas-paprotka.de/ref/codeunit/27-confirm-management/"},"table:271":{"name":"Bank Account Ledger Entry","url":"https://jonas-paprotka.de/ref/table/271-bank-account-ledger-entry/"},"table:1250":{"name":"Bank Statement Matching Buffer","url":"https://jonas-paprotka.de/ref/table/1250-bank-statement-matching-buffer/"},"table:1248":{"name":"Ledger Entry Matching Buffer","url":"https://jonas-paprotka.de/ref/table/1248-ledger-entry-matching-buffer/"},"codeunit:1251":{"name":"Record Match Mgt.","url":"https://jonas-paprotka.de/ref/codeunit/1251-record-match-mgt/"}},"procs":[{"name":"MatchManually","line":72,"kind":"procedure","params":2,"steps":[[85,"call","PerformOneToOneOrManyMatch",3],[87,"call","PerformManyToOneMatch",2]]},{"name":"PerformManyToOneMatch","line":90,"kind":"procedure","access":"local","params":2,"steps":[[100,"ext","codeunit",375,"RemoveApplication",1],[103,"ext","codeunit",375,"SetLineCount",1],[105,"call","RemoveMatchesFromRecLines",1],[109,"event","OnPerformManyToOneMatchOnBeforeApplyEntries",0],[110,"ext","codeunit",375,"ApplyEntries",3],[111,"event","OnPerformManyToOneMatchOnAfterApplyEntries",0],[112,"ext","table",1299,"CreatePaymentMatchingDetail",2]]},{"name":"PerformOneToOneOrManyMatch","line":118,"kind":"procedure","access":"local","params":3,"steps":[[131,"call","BankReconciliationLineInManyToOne",1],[132,"call","RemoveMatchesFromRecLines",1],[137,"ext","codeunit",375,"RemoveApplication",1],[138,"event","OnPerformOneToOneOrManyMatchOnBeforeApplyEntries",0],[139,"ext","codeunit",375,"ApplyEntries",3],[140,"event","OnPerformOneToOneOrManyMatchOnAfterApplyEntries",0],[141,"ext","table",1299,"CreatePaymentMatchingDetail",2]]},{"name":"BankReconciliationLineInManyToOne","line":153,"kind":"procedure","access":"internal","params":1,"steps":[[157,"ext","table",274,"FilterManyToOneMatches",1]]},{"name":"RemoveMatchesFromRecLines","line":181,"kind":"procedure","params":2,"steps":[[192,"event","OnBeforeRemoveMatchesFromRecLines",1],[213,"ext","codeunit",375,"RemoveApplication",1],[218,"ext","table",274,"FilterManyToOneMatches",1],[223,"ext","codeunit",375,"RemoveApplication",1],[236,"ext","codeunit",376,"RemoveApplication",1]]},{"name":"RemoveMatch","line":251,"kind":"procedure","params":2,"steps":[[260,"call","RemoveMatchesFromRecLines",2],[268,"ext","codeunit",375,"RemoveApplication",1],[269,"event","OnRemoveMatchOnAfterRemoveApplication",0],[280,"ext","codeunit",376,"RemoveApplication",1]]},{"name":"BankAccReconciliationAutoMatch","line":313,"kind":"procedure","params":4,"steps":[[336,"ext","codeunit",8703,"LogUptake",3],[336,"ext","table",273,"GetBankReconciliationTelemetryFeatureName",0],[339,"ext","table",274,"FilterBankRecLines",1],[342,"ext","codeunit",27,"GetResponseOrDefault",2],[348,"call","RemoveMatchesFromRecLines",1],[362,"ext","table",274,"FilterBankRecLinesByDate",2],[364,"ext","table",271,"SetBankReconciliationCandidatesFilter",1],[365,"call","InitializeBLEMatchingTempTable",2],[373,"write",1250,"DeleteAll"],[385,"call","AttemptToMatch",6],[389,"call","SaveOneToOneMatching",3],[392,"ext","table",271,"SetBankReconciliationCandidatesFilter",1],[393,"call","InitializeBLEMatchingTempTable",2],[395,"ext","table",274,"FilterBankRecLinesByDate",2],[404,"ext","table",271,"SetBankReconciliationCandidatesFilter",1],[405,"call","InitializeBLEMatchingTempTable",2],[407,"ext","table",274,"FilterBankRecLinesByDate",2],[409,"event","OnFindBestMatches",0],[411,"ext","table",271,"SetBankReconciliationCandidatesFilter",1],[412,"call","InitializeBLEMatchingTempTable",2],[414,"ext","table",274,"FilterBankRecLinesByDate",2],[416,"ext","table",274,"FilterBankRecLines",1],[424,"call","RemoveMatchesFromRecLines",1],[430,"call","ShowMatchSummary",1],[431,"ext","codeunit",8703,"LogUsage",3],[431,"ext","table",273,"GetBankReconciliationTelemetryFeatureName",0]]},{"name":"AttemptToMatch","line":448,"kind":"procedure","access":"local","params":6,"steps":[[472,"write",1248,"Delete"],[477,"call","MatchingIsAcceptable",3],[478,"call","MatchingIsHighConfidence",1],[479,"call","AddMatchToCandidatesIfBetter",3],[481,"call","MatchIsBetter",2],[482,"call","BestMatchingCandidateForBankAccountLedgerEntryIsWorse",2],[490,"call","AddMatchToCandidatesIfBetter",3]]},{"name":"AddMatchToCandidatesIfBetter","line":493,"kind":"procedure","access":"local","params":3,"steps":[[498,"call","AddMatchingCandidate",2],[501,"call","BestMatchingCandidateForBankAccountLedgerEntryIsWorse",2],[504,"call","RemoveBestMatchingCandidateForBankAccountLedgerEntry",2],[505,"call","AddMatchingCandidate",2]]},{"name":"RemoveBestMatchingCandidateForBankAccountLedgerEntry","line":511,"kind":"procedure","access":"local","params":2,"steps":[[515,"write",1250,"Delete"]]},{"name":"BestMatchingCandidateForBankAccountLedgerEntryIsWorse","line":519,"kind":"procedure","access":"local","params":2,"steps":[[529,"call","MatchIsBetter",2]]},{"name":"AddMatchingCandidate","line":534,"kind":"procedure","access":"local","params":2,"steps":[[537,"write",1250,"Insert"]]},{"name":"MatchIsBetter","line":546,"kind":"procedure","access":"local","params":2,"steps":[[557,"call","IsTextMatchingBetter",2],[568,"call","IsTextMatchingBetter",2]]},{"name":"IsTextMatchingBetter","line":581,"kind":"procedure","access":"local","params":2,"steps":[[589,"call","GetMax",2],[590,"call","GetMax",2],[592,"call","GetMax",2],[593,"call","GetMax",2],[595,"call","GetMax",2],[596,"call","GetMax",2],[598,"call","TextScoreGreaterThan",4],[599,"call","TextScoreGreaterThan",4],[600,"call","TextScoreGreaterThan",4],[602,"call","GetMaxScoreOfWinner",7]]},{"name":"MatchingIsHighConfidence","line":705,"kind":"procedure","access":"local","params":1,"steps":[[709,"call","GetMaxTextNearnessScore",1],[710,"call","GetMaxTextExactScore",1]]},{"name":"MatchingIsAcceptable","line":713,"kind":"procedure","access":"local","params":3,"steps":[[732,"call","IsAmountClose",2],[736,"call","BankReconciliationLineTextSimilarityScores",4],[737,"call","BankReconciliationLineTextSimilarityScores",4],[738,"call","BankReconciliationLineTextSimilarityScores",4],[751,"call","ListOfMatchedFields",6]]},{"name":"IsAmountClose","line":761,"kind":"procedure","access":"local","params":2,"steps":[[767,"call","SameSign",2]]},{"name":"BankReconciliationLineTextSimilarityScores","line":789,"kind":"procedure","access":"local","params":4,"steps":[[800,"ext","codeunit",1251,"CalculateStringNearness",4],[801,"ext","codeunit",1251,"CalculateExactStringNearness",3],[809,"ext","codeunit",1251,"CalculateStringNearness",4],[810,"ext","codeunit",1251,"CalculateExactStringNearness",3],[818,"ext","codeunit",1251,"CalculateStringNearness",4],[819,"ext","codeunit",1251,"CalculateExactStringNearness",3],[827,"ext","codeunit",1251,"CalculateStringNearness",4],[828,"ext","codeunit",1251,"CalculateExactStringNearness",3]]},{"name":"InitializeBLEMatchingTempTable","line":835,"kind":"procedure","params":2,"steps":[[838,"write",1248,"DeleteAll"],[842,"ext","table",1248,"InsertFromBankAccLedgerEntry",1]]},{"name":"SaveOneToOneMatching","line":885,"kind":"procedure","params":3,"steps":[[904,"ext","codeunit",375,"ApplyEntries",3],[905,"ext","table",1299,"CreatePaymentMatchingDetail",2]]},{"name":"SaveManyToOneMatching","line":909,"kind":"procedure","params":3,"steps":[[924,"write",1250,"Insert"],[954,"ext","codeunit",375,"SetLineCount",1],[955,"ext","codeunit",375,"SetLineNumber",1],[956,"ext","codeunit",375,"SetAppliedAmount",1],[959,"ext","codeunit",375,"ApplyEntries",3],[962,"ext","table",1299,"CreatePaymentMatchingDetail",2],[966,"write",1250,"Delete"],[970,"write",1250,"Delete"]]},{"name":"ShowMatchSummary","line":974,"kind":"procedure","params":1,"steps":[[994,"call","GetMatchLengthTreshold",0],[997,"event","OnShowMatchSummaryOnAfterSetFinalText",1]]},{"name":"GetDescriptionMatchScore","line":1002,"kind":"procedure","params":4,"steps":[[1010,"ext","codeunit",1251,"Trim",1],[1011,"ext","codeunit",1251,"Trim",1],[1013,"call","GetMatchLengthTreshold",0],[1014,"call","GetNormalizingFactor",0],[1017,"ext","codeunit",1251,"CalculateStringNearness",4],[1022,"ext","codeunit",1251,"CalculateStringNearness",4],[1027,"ext","codeunit",1251,"CalculateStringNearness",4]]}]}