Skip to content

Extending pages with the DMS Factbox

In this documentation we will create an extension that extends a page in Business Central with the DMS Factbox. The factbox is used to manage and store record related documents.

There are two ways to do this:

In case of an own page, you can add the code directly to the page. With other page you can create a page extension which will execute the code.

The following requirements must be met:

  • The DMS module must be licensed.
  • CORE by Simova must be available in the extension as a reference.
  • DMS by Simova must be present in the extension as a reference.

Code for the extension of a Business Central Page with The DMS DropZone FB and the Barcode Return FB:

AL
pageextension 5492919 "SIM_DMS PostedSalesInvoiceExt" extends "Posted Sales Invoice"
{
    layout
    {
        addfirst(FactBoxes)
        {
            part(SIM_DMSDropZoneFB; "SIM_DMS DropZone FB")
            {
                ApplicationArea = All;
            }
        }
    }
    var
        GlobalBarcodeVisibleBoolean: Boolean;

    trigger OnAfterGetCurrRecord()
    begin
        CurrPage.SIM_DMSDropZoneFB.Page.SetVariant(CurrPage.OBJECTID(FALSE), Rec, Rec."No.");
        CurrPage.SIM_DMSBarcodeReturnFB.Page.SetVariant(CurrPage.OBJECTID(FALSE), Rec, Rec."No.");
        GlobalBarcodeVisibleBoolean := CurrPage.SIM_DMSBarcodeReturnFB.Page.GetVisible();
    end;
}

Info

The Barcode factbox has been moved to the Document Inbound App. Please move to the respective area in the documentation to see the new integration.

This code adds the DMS factbox to the page which sends the reference of the selected entry to DMS. This allows the archiving of documents for the desired entries in the repository when a document library and mapping has been configured for the table.