Browsing like the 90s, putting Business Central in pop-up windows!

In this video, I take a look at how you can place Business Central in a pop-up window. You can place anything from Business in a pop-up, and it’s surprisingly easy to do. Check out the video:

https://youtu.be/9PX2M1Kuvd4

In this video, Erik explores a fun and somewhat retro approach to the Business Central UI: launching BC pages in standalone pop-up windows using JavaScript control add-ins. Along the way, he demonstrates how to build a custom control add-in, use the GetUrl function to generate page URLs, and leverage various URL parameters to strip away the standard Business Central chrome — headers, navigation bars, action bars, and fact boxes — to create a clean, minimal pop-up experience.

Why Pop-Up Windows?

Most of the time, having everything in the browser works great. But there are scenarios — particularly from a UI perspective — where pulling a specific page out into its own window can be useful. Maybe you want to put a customer card on a second monitor, or you want to display a focused, stripped-down view of a list without all the surrounding navigation. That’s exactly what we’re going to build.

Creating the Control Add-In

The only way to execute JavaScript from within Business Central is through a control add-in. Even though we’re inserting what’s sometimes called a “user control” onto a page, the AL object we create is actually a controladdin.

The key design goal is to make this control invisible — it shouldn’t take up any space on the page. We set all dimensions to 1 pixel and define a procedure that the AL code can call to trigger the pop-up:

controladdin Popup
{
    RequestedHeight = 1;
    RequestedWidth = 1;
    MinimumHeight = 1;
    MinimumWidth = 1;
    MaximumHeight = 1;
    MaximumWidth = 1;

    Scripts = 'script.js';

    procedure Popup(url: Text);
}

The procedure Popup(url: Text) declaration tells AL that this control add-in exposes a method called Popup that accepts a URL parameter. The actual implementation lives in JavaScript.

The JavaScript: Opening a Pop-Up Window

In the script.js file, we implement the Popup function using the standard window.open API. The third parameter to window.open is a features string that lets us control the appearance of the new window:

function Popup(url) {
    window.open(
        url,
        '_blank',
        'toolbar=0,location=0,menubar=0,width=500,height=750'
    );
}

By setting toolbar=0, location=0, and menubar=0, we strip away the browser chrome. Using _blank as the target ensures we open a truly separate window rather than a new tab. The result is a compact 500×750 pixel pop-up — very 90s!

Wiring It Up on a Page

Next, we need to place the control add-in on a page and create an action to trigger it. Here’s how it looks on the Customer List page extension:

pageextension 50100 CustomerListExt extends "Customer List"
{
    layout
    {
        addlast(Content)
        {
            usercontrol(PopupControl; Popup)
            {
            }
        }
    }

    actions
    {
        addlast(Processing)
        {
            action(PopupAction)
            {
                Caption = 'Pop up';

                trigger OnAction()
                var
                    Rec2: Record Customer;
                    Url: Text;
                begin
                    Rec2.SetRange("No.", Rec."No.");

                    Url := GetUrl(ClientType::Current, CompanyName, ObjectType::Page, Page::"Customer Card", Rec2, true);
                    Url += '&mode=view&captionhelpdisabled=1&showribbon=0&shownavigation=0&showuiparts=0&showheader=0&redirect=0';

                    CurrPage.PopupControl.Popup(Url);
                end;
            }
        }
    }
}

The GetUrl function is a built-in AL function that constructs a proper Business Central URL including the protocol, host, tenant, company, object type, object ID, and even filters based on a record variable. By creating a second record variable (Rec2) and setting a range filter on it, we can pass the currently selected customer to the pop-up.

Controlling the Business Central UI with URL Parameters

This is where things get really interesting. Business Central supports a rich set of URL parameters that control the web client’s appearance. The Web Client URL documentation describes all of them. Here are the ones Erik uses:

  • mode — Controls the page mode: view, edit, or create
  • captionhelpdisabled — Set to 1 to disable field caption help lookups
  • showribbon — Set to 0 to hide the action bar (Microsoft still calls it “ribbon” internally!)
  • shownavigation — Set to 0 to hide the navigation bar
  • showuiparts — Set to 0 to hide FactBoxes
  • showheader — Set to 0 to hide the top header bar (though keyboard shortcuts like Tell Me still work)
  • redirect — Set to 0 to prevent mobile app redirect prompts

Other notable parameters mentioned in the documentation include:

  • isembedded — Opens BC in embedded mode, intended for embedding in other web apps like SharePoint
  • pagesize — Controls how many rows display in a list (default is 20)
  • profile — Opens as a specific profile/role
  • extension — Isolates the UI to show only elements from a specific extension (also opens the designer)

The Result

With all those URL parameters applied, the pop-up window shows a clean, minimal customer card — no header, no navigation bar, no action bar, no FactBoxes. Just the data. Erik also tested it with a customer list filtered to names starting with “B,” which rendered nicely as a compact list view in the pop-up.

It’s worth noting a few limitations:

  • Some navigation elements (like the three-dot menu) may still appear even with shownavigation=0
  • The browser’s location bar typically can’t be hidden due to modern browser security policies
  • Closing pop-up windows programmatically via JavaScript is restricted — browsers generally only allow window.close() on windows that were opened by JavaScript, and even then with caveats
  • The pop-up is completely independent from the parent page. Communicating back from the pop-up to the original page would require complex JavaScript messaging and is difficult to make reliable

Conclusion

While this technique feels a bit retro — hence the “browsing like the 90s” title — it demonstrates some genuinely useful capabilities. The combination of AL control add-ins for JavaScript execution, the GetUrl function for URL generation, and Business Central’s URL parameters for UI control gives you a surprising amount of flexibility. Whether you want to pop out a card onto a second monitor, create a focused data entry experience, or build a kiosk-style display, these building blocks can get you there. Just don’t expect to easily close those windows programmatically — that’s one area where the browser’s modern security model puts up a firm boundary.