[Function Expose/Event Request] COD1255 DocumentMatchingForBankLedgerEntry, DocNoMatching
Hi, Can you please expose functions DocumentMatchingForBankLedgerEntry and DocNoMatching from COD1255 as External, and add an Event Publisher & "handled" code to DocumentMatchingForBankLedgerEntry as marked bold below.
`LOCAL DocumentMatchingForBankLedgerEntry(VAR BankPmtApplRule : Record "Bank Pmt. Appl. Rule";BankAccReconciliationLine : Record "Bank Acc. Reconciliation Line";TempLedgerEntryMatchingBuffer : TEMPORARY Record "Ledger Entry Matching Buffer") BankPmtApplRule."Doc. No./Ext. Doc. No. Matched" := BankPmtApplRule."Doc. No./Ext. Doc. No. Matched"::No;
SearchText := UPPERCASE(BankAccReconciliationLine."Transaction Text" + ' ' + BankAccReconciliationLine."Additional Transaction Info");
IF DocNoMatching(SearchText,TempLedgerEntryMatchingBuffer."Document No.") THEN BEGIN BankPmtApplRule."Doc. No./Ext. Doc. No. Matched" := BankPmtApplRule."Doc. No./Ext. Doc. No. Matched"::Yes; EXIT; END;
IF DocNoMatching(SearchText,TempLedgerEntryMatchingBuffer."External Document No.") THEN BEGIN BankPmtApplRule."Doc. No./Ext. Doc. No. Matched" := BankPmtApplRule."Doc. No./Ext. Doc. No. Matched"::Yes; EXIT; END;
OnBeforeCustomerMatch(SearchText : Text, TempLedgerEntryMatchingBuffer :TEMPORARY Record "Ledger Entry Matching Buffer", VAR BankPmtApplRule : Record "Bank Pmt. Appl. Rule"); IF BankPmtApplRule."Doc. No./Ext. Doc. No. Matched" = BankPmtApplRule."Doc. No./Ext. Doc. No. Matched"::Yes THEN EXIT;
CustLedgerEntry.SETRANGE("Document Type",TempLedgerEntryMatchingBuffer."Document Type"); CustLedgerEntry.SETRANGE("Document No.",TempLedgerEntryMatchingBuffer."Document No."); CustLedgerEntry.SETRANGE("Posting Date",TempLedgerEntryMatchingBuffer."Posting Date");`