| Docs Help
  AppSource  
Docs  /  App  /  NAVAX Replication  /  Developer Information

 Enable Manual Replication for Additional Tables


2026/02/20 • 1 min. to read
NAVAX Replication is already integrated into many card pages by default via page extensions. The underlying code is identical on all pages. Therefore, NAVAX Replication can also be integrated into additional card pages with minimal effort via individual development. Below is an example code for integration on the Customer Card page.
pageextension 70161751 "NVXRPL Customer Card" extends "Customer Card"
{
    ContextSensitiveHelpPage = 'ReplicationFactbox';
    layout
    {
        addfirst(factboxes)
        {
            part(ReplicationPart; NVXRPLReplicationFactbox)
            {
                ApplicationArea = All;
                Visible = ManualReplicationActivated;
            }
        }
    }
    trigger OnAfterGetCurrRecord()
    var
        ReplicationTableSetup: Record "NVXRPL Replication Table Setup";
        Ref: RecordRef;
    begin
        Ref.GetTable(Rec);
        ManualReplicationActivated := ReplicationTableSetup.NeedsFactBox(Ref.Number());
        if ManualReplicationActivated then
            UpdateReplPart(false);
    end;

    trigger OnModifyRecord(): Boolean
    begin
        if ManualReplicationActivated then
            UpdateReplPart(false);
    end;

    trigger OnInsertRecord(BelowxRec: Boolean): Boolean
    begin
        UpdateReplPart(false);
    end;

    trigger OnNewRecord(BelowxRec: Boolean)
    begin
        UpdateReplPart(true);
    end;

    var
        ManualReplicationActivated: Boolean;

    local procedure UpdateReplPart(CallFromOnNewRec: Boolean)
    var
        RecId: RecordId;
        RecRef: RecordRef;
    begin
        if CallFromOnNewRec then
            Clear(RecId)
        else begin
            RecId := Rec.RecordId;
            CurrPage.ReplicationPart.Page.SetRecId(RecId);
            if RecRef.Get(Rec.RecordId) then
                CurrPage.ReplicationPart.Page.SetRecords();
        end;
        CurrPage.ReplicationPart.Page.Update(false);
    end;
}


Submit feedback for
DE|EN Imprint