Due to scheduled maintenance, some areas of our site are currently inaccessible. Thank you for your patience.

Please reach out to sales@eonesolutions.com with any questions.

How to Embed Widgets on your Business Central Role Center

How to Embed Widgets on your Business Central Role Center

With the use of a Popdock widget you can integrate a Popdock list or multiple lists directly onto your Business Central Role Center. Below is an example of how to use AL code and Control Add-Ins to do this.

A Popdock widget will need to be created prior to following these steps because you will need the widget URL.  Click Here to learn how to create a Popdock widget.

Final code of this example can be downloaded here.

Add Popdock Dependencies

The Popdock for Dynamics 365 Business Central extension from AppSource already contains the Control Add-in you will be using so you can just add a dependency to the existing extension.

In your AL project add the below dependency to your app.json file.

"dependencies": [
    {
      "id": "f58a05f1-7501-400f-ac28-bc3294e1619a",
      "name": "Popdock for Dynamics 365 Business Central",
      "version": "1.0.0.0",
      "publisher": "eOne Solutions"
    }
  ],

Add a Card Part to the Role Center

Create a Card Part to call the Popdock Control Add-in.

// Replace https://widget-weu.popdock.com/embed/aa3e51db-5e4e-ce57-53ec-b4117572b602 with your widget id
page 50103 PopdockRoleCenterCardPart
{
    PageType = CardPart;
    InsertAllowed = false;
    ModifyAllowed = false;
    DeleteAllowed = false;

    layout
    {
        area(Content)
        {
            usercontrol(widget; eOnePopdockFastTab)
            {
                ApplicationArea = All;

            }
        }
    }
    trigger OnAfterGetCurrRecord()
    var
        Url: Text;
        Session: SessionSettings;
    begin
        Session.Init();
        Url := 'https://widget-weu.popdock.com/embed/aa3e51db-5e4e-ce57-53ec-b4117572b602?theme=dynamics_bc&locale=' + FORMAT(Session.LocaleId) + '&companyName=' + COMPANYNAME;
        CurrPage.widget.CreateUrl(Url);
    end;
}

Finally, create a Page Extension on the Role Center page to be modified. You can modify the part to reference the name you gave the Card Part.

pageextension 50103 "Popdock Role Center" extends "Business Manager Role Center"
{
    layout
    {
        addlast(rolecenter)
        {

            part(IframeFactBox; PopdockRoleCenterCardPart)
            {
                ApplicationArea = all;
                Caption = 'Popdock Details';
            }
        }
    }
}

Now you will see your Popdock widget on the Business Manager Role Center!

Content
Add Popdock Dependencies ‍Add a Card Part to the Role Center

Feeling stuck? Get the support and guidance you need to help you power through any data challenge

Reset Filters