Skip to main content

Extensibility

Advanced Bank Reconciliation exposes integration events and procedures that other apps can use to extend matching, background processing, reconciliation-line behavior, transfer, and posting. This page lists all integration events published by the main app.

Subscribe to an event by using the event name and publisher object shown below.

Automatic Matching​

These events let you intercept matching decisions and adjust how a reconciliation line or matching rule is processed.

EventPublisherPurpose
OnBeforeMatchReconLineReconcilePayments_APR_TSLRuns before a reconciliation line is matched. Set Handled to prevent the standard matching process.
OnAfterApplyAutoMatchRuleFiltersReconcilePayments_APR_TSLRuns after the matching-rule filters are applied. Use it to adjust the record filter or take over the matching operation.
OnBeforeClearLineMatchReconcilePayments_APR_TSLRuns before existing matches are cleared from a reconciliation line. Set Handled to replace the standard behavior.

Background Matching​

These events cover checks, execution, completion, and cleanup for automatic matching that runs in the background.

EventPublisherPurpose
OnBeforeDoChecksBeforeRunAutoMachPmtAutoMtchYesNo_APR_TSLRuns before the checks that precede automatic matching.
OnAfterDoChecksBeforeRunAutoMachPmtAutoMtchYesNo_APR_TSLRuns after the pre-run checks and before the background matching task is started.
OnBeforeRunAutoMatchPmtAutoMtchBckgrndRun_APR_TSLRuns before a scheduled background matching task starts.
OnAfterRunAutoMatchPmtAutoMtchBckgrndRun_APR_TSLRuns after a background matching task completes successfully.
OnBeforeCleanUpAutoMachBackgroundTableScheduledAutoMatch_APR_TSLRuns before scheduled background matching records are deleted for a reconciliation.

Reconciliation Line Behavior​

These events allow an extension to customize line styling, applied-document text, allocation handling, and dimension confirmation.

EventPublisherPurpose
OnBeforeGetLineStyleText2_APR_TSLBankAccReconLine table extensionRuns before the line style and applied-amount style are calculated.
OnBeforeGetAppliedDocNoText2_APR_TSLBankAccReconLine table extensionRuns before the applied-document numbers text is calculated.
OnBeforeCheckAndInsertAllocation2_APR_TSLBankAccReconLine table extensionRuns before an allocation is checked and inserted.
OnBeforeAskConfirmationToUpdateAllLineDim_APR_TSLBankAccReconLine table extensionRuns before the confirmation to update dimensions on all reconciliation lines is shown.

Transfer and Posting​

These events let extensions modify or replace the transfer of reconciliation lines to the General Journal and the posting of customer or vendor entries.

EventPublisherPurpose
OnBeforeAfterGetBankAccReconciliationLineRecordTransBankRectoGenJnl_APR_TSLRuns before the report processes a bank reconciliation line.
OnBeforeTransferGJLTransBankRectoGenJnl_APR_TSLRuns before a General Journal line is created from a reconciliation line. Set IsHandled to replace the standard transfer.
OnAfterTransferGJLTransBankRectoGenJnl_APR_TSLRuns after a General Journal line has been created from a reconciliation line.
OnBeforePostEntriesTrfCustVendEntries_APR_TSLRuns before customer or vendor entries are posted during transfer. Set IsHandled to replace the standard posting.

Overriding Transfer to Journal Defaults​

The Transfer Bank Recon to General Journal report (TransBankRectoGenJnl_APR_TSL, ID 70254115) is the processing report used by the Transfer to Journal action. By default, it works out which Gen. Journal Template, Gen. Journal Batch, and automatic posting setting to use from the Payment Reconciliation Setup and, if configured, the Bank Account card.

If your app runs this report programmatically - for example to automate the transfer to journal step after an import - you can override any of these defaults before running the report using the following exposed procedures.

SetBankAccRecon​

procedure SetBankAccRecon(var UseBankAccReconciliation: Record "Bank Acc. Reconciliation")

Sets the bank account reconciliation whose statement lines are transferred, and resets the Gen. Journal Template, Gen. Journal Batch, and automatic posting option back to the defaults from the Payment Reconciliation Setup. Call this first, before any of the overrides below, since it will reset values you have already set.

SetJournalTemplateAndBatch​

procedure SetJournalTemplateAndBatch(GenJournalTemplateName: Code[10]; GenJournalBatchName: Code[10])

Overrides the Gen. Journal Template and Gen. Journal Batch that the transferred lines are inserted into, instead of the batch that would otherwise be defaulted from the Payment Reconciliation Setup (or Intercompany Template/Batch, if the lines being transferred are Intercompany).

SetPostAfterInsert​

procedure SetPostAfterInsert(PostAfterInsertValue: Boolean)

Overrides whether the journal is posted and matched automatically once the lines have been transferred, instead of using the Auto Post Bank Journal setting from the Payment Reconciliation Setup or Bank Account card.

Example​

var
BankAccReconciliation: Record "Bank Acc. Reconciliation";
TransferToGenJnl: Report TransBankRectoGenJnl_APR_TSL;
begin
BankAccReconciliation.Get(BankAccReconciliation."Statement Type"::"Bank Reconciliation", BankAccountNo, StatementNo);

TransferToGenJnl.SetBankAccRecon(BankAccReconciliation);
TransferToGenJnl.SetJournalTemplateAndBatch(GenJournalTemplateName, GenJournalBatchName);
TransferToGenJnl.SetPostAfterInsert(true);
TransferToGenJnl.Run();
end;
note

SetJournalTemplateAndBatch and SetPostAfterInsert are both optional - only call the ones you need to override. Anything you don't set keeps the default worked out by SetBankAccRecon.