Extending Banking Export

This article provides an overview for partners extending Continia Banking. It introduces the public extensibility points used for payment export and reconciliation and shows the minimum AL patterns for common scenarios.

Use this article to determine where to extend and which pattern to use.

To choose the correct extensibility surface

The following table maps each scenario to the surface that handles it and the pattern you apply.

ScenarioSurfaceHow to extend
Override creditor or debtor identity for vendor, customer, or employee journal lines.1 (migrated)Subscribe to OnBeforeGet*Information* events on CTS-CB Pmt. Entry Mgt. Publ. and populate the Alt. Pmt. Creditor or Alt. Pmt. Debtor buffer.
Provide creditor and bank details for custom ad hoc payments.1 (ad hoc)Subscribe to the three OnBeforeFillAlternate* events on CTS-CB Pmt. Entry Mgt. Publ. and set Handled := true for each scope you populate.
Include additional remittance text.2Subscribe to OnAfterCalcRemForJournalLine or OnAfterCalcRemForSuggestion on CTS-PE Rem. Info. Pub..
Check whether a payment entry field is active or required.3Call CTS-CB Field Validation API.
Read structured payment references (FIK, KID, IBAN reference, end-to-end ID).4Call CTS-CB Payment Reference API.
Validate IBAN and bank details.5Call CTS-CB Bank Detail Validator.

Advarsel!

If your solution subscribes to events on CTS-CB Pmt. Entry Mgt. Ext. Publ., those subscriptions continue to work in Continia Banking 2026 R1 (v28.1). However, this publisher and its buffers are obsolete and scheduled for removal in a future release. To ensure compatibility, migrate to the new public publisher CTS-CB Pmt. Entry Mgt. Publ.

Migrated events for master data overrides - surface 1

Use surface 1 for migrated events to override values that Continia Banking derives from master data (vendor, customer, or employee). The engine provides a temporary, scope-specific buffer. Write your values directly to this buffer.

To override vendor creditor data

  1. Create a subscriber codeunit and set SingleInstance = true.
  2. Subscribe to OnBeforeGetVendorInformationAsCreditor on CTS-CB Pmt. Entry Mgt. Publ..
  3. Read your override record. If no override exists, exit the procedure.
  4. Assign the override values to the Alt. Pmt. Creditor buffer fields.
  5. (Optional) Set Delete Empty Values to true to clear engine values when overrides are blank.

Example

codeunit 50000 "Banking Vendor Creditor Subscriber"
{
    SingleInstance = true;

    [EventSubscriber(
        ObjectType::Codeunit,
        Codeunit::"CTS-CB Pmt. Entry Mgt. Publ.",
        'OnBeforeGetVendorInformationAsCreditor',
        '',
        false,
        false)]
    local procedure OverrideVendorCreditor(
        VendorNo: Code[20];
        var AltPmtCreditor: Record "CTS-CB Alt. Pmt. Creditor" temporary)
    var
        VendorOverride: Record "MyApp Vendor Override";
    begin
        if not VendorOverride.Get(VendorNo) then
            exit;

        AltPmtCreditor."Creditor Name" := VendorOverride.OverrideName;
        AltPmtCreditor."Creditor Address" := VendorOverride.OverrideAddress;

        // Optional: clear engine values when overrides are blank.
        // AltPmtCreditor."Delete Empty Values" := true;
    end;
}

How Continia Banking applies the override

  1. Continia Banking loads data from the master record.
  2. Continia Banking merges your buffer values with the engine values.
  3. Non-blank buffer fields override system values.
  4. Continia Banking ignores blank buffer fields, unless Delete Empty Values = true.

Ad hoc events for custom payees - surface 1

Use surface 1 for ad hoc events when a journal line does not reference a standard payee (vendor, customer, or employee). For ad hoc payments, Continia Banking raises three separate events, one for each data scope:

  • Account
  • Creditor
  • Creditor bank

Subscribe only to the scopes that you populate. Set Handled := true for each scope you take over.

To provide full ad hoc payee information

  1. Create a subscriber codeunit with SingleInstance = true.
  2. Add a helper procedure that identifies your ad hoc scenario.
  3. Subscribe to OnBeforeFillAlternateAccount and assign the routing values. Set Handled := true.
  4. Subscribe to OnBeforeFillAlternateCreditor and assign creditor identity and address fields. Set Handled := true.
  5. Subscribe to OnBeforeFillAlternateCreditorBank and assign IBAN, SWIFT, and bank details. Set Handled := true.

Example

codeunit 50001 "Banking AdHoc Subscriber"
{
    SingleInstance = true;

    [EventSubscriber(
        ObjectType::Codeunit,
        Codeunit::"CTS-CB Pmt. Entry Mgt. Publ.",
        'OnBeforeFillAlternateAccount',
        '',
        false,
        false)]
    local procedure FillAccount(
        GenJournalLine: Record "Gen. Journal Line";
        var AltPmtAccount: Record "CTS-CB Alt. Pmt. Account" temporary;
        var Handled: Boolean)
    begin
        if not IsAdHoc(GenJournalLine) then
            exit;

        AltPmtAccount."Alternate Account No." := 'YOUR-ROUTING-CODE';
        Handled := true;
    end;

    [EventSubscriber(
        ObjectType::Codeunit,
        Codeunit::"CTS-CB Pmt. Entry Mgt. Publ.",
        'OnBeforeFillAlternateCreditor',
        '',
        false,
        false)]
    local procedure FillCreditor(
        GenJournalLine: Record "Gen. Journal Line";
        var AltPmtCreditor: Record "CTS-CB Alt. Pmt. Creditor" temporary;
        var Handled: Boolean)
    begin
        if not IsAdHoc(GenJournalLine) then
            exit;

        AltPmtCreditor."Creditor Name" := 'Acme Industries';
        AltPmtCreditor."Creditor Address" := 'Hovedgaden 1';
        AltPmtCreditor."Creditor City" := 'Copenhagen';
        AltPmtCreditor."Creditor Country Code" := 'DK';
        Handled := true;
    end;

    [EventSubscriber(
        ObjectType::Codeunit,
        Codeunit::"CTS-CB Pmt. Entry Mgt. Publ.",
        'OnBeforeFillAlternateCreditorBank',
        '',
        false,
        false)]
    local procedure FillBank(
        GenJournalLine: Record "Gen. Journal Line";
        var AltPmtCreditorBank: Record "CTS-CB Alt. Pmt. Creditor Bank" temporary;
        var Handled: Boolean)
    begin
        if not IsAdHoc(GenJournalLine) then
            exit;

        AltPmtCreditorBank."Creditor IBAN" := 'DK5000400440116243';
        AltPmtCreditorBank."Creditor Swift" := 'DABADKKK';
        Handled := true;
    end;

    local procedure IsAdHoc(GenJournalLine: Record "Gen. Journal Line"): Boolean
    begin
        // Replace this with the logic that identifies the ad hoc case for your scenario.
        exit(GenJournalLine."Account Type" = GenJournalLine."Account Type"::"G/L Account");
    end;
}

Bemærk

The buffer schema enforces scope. Each event exposes only the fields that apply to that scope. The AL compiler prevents you from writing creditor identity fields to a bank buffer, and vice versa.

Include additional remittance text - surface 2

Use surface 2 to add supplementary remittance text. Choose the event based on when your data is available.

EventWhen it runsContext
OnAfterCalcRemForJournalLineAfter remittance lines are transferred to a journal line.GenJournalLine
OnAfterCalcRemForSuggestionAfter remittance is written for a suggestion.PaymentSuggestionHead

Insert one record per line into the buffer. Continia Banking assigns line numbers automatically.

To include additional remittance text

  1. Create a subscriber codeunit and set SingleInstance = true.
  2. Subscribe to OnAfterCalcRemForJournalLine on CTS-PE Rem. Info. Pub..
  3. Read your additional remittance text record using GenJournalLine."CTS-CB End To End Id" as the key. If no record exists, exit the procedure.
  4. Insert one record per advice line into the Alt. Rem. Info. Line buffer. Use a helper procedure to truncate the text to the field length.
  5. (Optional) Set ReplaceSystemRows := true to delete the Continia Banking system rows before Continia Banking processes the buffer.

Example

codeunit 50102 "Banking Long Advice Subscriber"
{
    SingleInstance = true;

    [EventSubscriber(
        ObjectType::Codeunit,
        Codeunit::"CTS-PE Rem. Info. Pub.",
        'OnAfterCalcRemForJournalLine',
        '',
        false,
        false)]
    local procedure AppendLongAdvice(
        GenJournalLine: Record "Gen. Journal Line";
        var AltRemInfoLine: Record "CTS-CB Alt. Rem. Info. Line" temporary;
        var ReplaceSystemRows: Boolean)
    var
        LongAdvice: Record "MyApp Long Advice";
    begin
        if not LongAdvice.Get(GenJournalLine."CTS-CB End To End Id") then
            exit;

        InsertLine(AltRemInfoLine, 1, 'Invoice ' + LongAdvice."Invoice No.");
        InsertLine(AltRemInfoLine, 2, 'Reference: ' + LongAdvice.Reference);

        // Optional: set ReplaceSystemRows := true to replace system remittance lines.
    end;

    local procedure InsertLine(
        var AltRemInfoLine: Record "CTS-CB Alt. Rem. Info. Line";
        EntryNo: Integer;
        LineText: Text)
    begin
        AltRemInfoLine.Init();
        AltRemInfoLine."Entry No." := EntryNo;
        AltRemInfoLine."Remittance Text" :=
            CopyStr(LineText, 1, MaxStrLen(AltRemInfoLine."Remittance Text"));
        AltRemInfoLine.Insert();
    end;
}

Behavior details

  • Continia Banking limits Remittance Text to 180 characters.
  • In the journal-line scope, End To End Id falls back to the journal line value if blank.
  • In the suggestion scope, Continia Banking ignores End To End Id.
  • ReplaceSystemRows := true has no effect if the buffer is empty. Continia Banking preserves system rows unless you provide at least one replacement record.

Validation and lookup APIs - surface 3 to 5

Surfaces 3 to 5 use synchronous APIs and don't raise events. You can call these APIs from custom pages, assisted setup, or pre-validation logic.

Surface 3: field validation API

Use the CTS-CB Field Validation API codeunit to determine whether a payment entry field is active, enabled, or required. The result applies to a specific combination of bank system and payment method. Use this information to conditionally render the UI based on what the engine supports for that configuration.

Surface 4: payment reference API

Use the CTS-CB Payment Reference API codeunit to read structured payment references for a customer ledger entry, including:

  • FIK
  • KID
  • IBAN reference
  • End-to-end ID

The API returns the most-structured value available, based on a fixed precedence order. You don't need to reimplement this logic.

Surface 5: bank detail validator

Use the CTS-CB Bank Detail Validator codeunit to validate IBAN and related bank details before you save data or export payments. The validator performs an ISO 13616 mod-97 check and a country-prefix check. An overload returns a human-readable error message that you can show in the UI.