
With the release of Business Central 2025 Wave 1, new page type UserControlHost is introduced which enables embedding custom JavaScript-based controls into the Business Central web client.
What is UserControlHost?The UserControlHost page type allows you to embed custom client-side controls—typically written in JavaScript—inside the Business Central web client using the ControlAddIn object.These controls are built with web technologies—JavaScript, HTML, and CSS—and provide flexibility far beyond standard AL UI elements.
Think of UserControlHost as a “wrapper” that renders client-side controls defined via the ControlAddIn object.
You might consider using UserControlHost for:
How to use To use the UserControlHost, you need two key components:
controladdin "MyWave2025Control"
{
Scripts="scripts/chart.js", 'scripts/mycontrol.js';
StartupScript="scripts/init.js";
StyleSheets="styles/mycontrol.css";
RequestedHeight = 400;
RequestedWidth = 600;
AutoAdjustHeight = true;
AutoAdjustWidth = true;
Events = OnItemSelected(text);
Methods = LoadData(data: Text);
}
2) Create the UserControlHost Page
page 50200 "Dashboard Host"
{
PageType = UserControlHost;
ApplicationArea = All;
layout
{
area(content)
{
usercontrol(MyCustomChart; "MyWave2025Control")
{
ApplicationArea = All;
}
}
}
trigger OnOpenPage()
begin
CurrPage.MyCustomChart.LoadData('{"region": "Thailand"}');
end;
trigger OnControlReady()
begin
Message('Custom Control is ready!');
end;
}
The UserControlHost page type, especially with Wave 1 2025 enhancements, is the go-to choice for scenarios where traditional AL UI just won’t cut it. Whether you’re building modern dashboards, embedding custom charts, or creating interactive widgets
Original Post https://ammolhsaallvi.blog/2025/04/11/embedding-powerful-ui-with-usercontrolhost-pagetype-in-business-central/






