web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :

How to Add a Hyperlink to a Role Center in Business Central

Khushbu Rajvi. Profile Picture Khushbu Rajvi. 18,797 Super User 2025 Season 2

Sometimes, you may want to quickly add a button on the Role Center page that opens an external website (e.g., company portal, Microsoft docs, etc.). This can be done by extending the Role Center and adding a custom action that uses the Hyperlink system function in AL.

Code Example 

Codeunit

codeunit 50100 URLDisplay
{
    trigger OnRun()
    begin
        Hyperlink('https://www.microsoft.com/en-us/dynamics-365/products/business-central');
    end;
}

Page extension

pageextension 50100 MyExtension extends "Business Manager Role Center"
{
    actions
    {
        addbefore("Sales Quote")
        {
            action(AddHyperlink)
            {
                Caption = 'URL Display';
                ApplicationArea = All;
                Image = link;
                RunObject = codeunit URLDisplay;
            }
        }
    }
}

Explanation of the Code

  1. Creating the Codeunit (URLDisplay)

    • We created a new codeunit named URLDisplay.

    • Inside the OnRun() trigger of this codeunit, we used the Hyperlink() function to open the Business Central product page in the browser.

    • The purpose of this codeunit is to encapsulate the action of opening the hyperlink.

    👉 Why? Because Role Center pages do not support the trigger OnAction() directly on actions. To work around this, we run a codeunit instead.

  2. Extending the Role Center Page

    • We extended the Business Manager Role Center page.

    • In the actions section, we inserted a new action before the “Sales Quote” action.

    • The action has:

      • A caption → "URL Display"

      • An icon → Image = link;

      • A run object → RunObject = codeunit URLDisplay;

    This means when the user clicks the button on the Role Center, the system will execute the codeunit, and that codeunit will in turn open the hyperlink.

 Result

Once you deploy this extension, a new “URL Display” button will appear in your Role Center.
Clicking it will immediately open the defined URL in the browser.






✨ That’s it — a simple and effective way to add external links to your Role Center!

Thanks For Reading...!!😊


Regards,
Khushbu Rajvi

This was originally posted here.

Comments

*This post is locked for comments