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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Unanswered

Add and remove page control in a page dynamically in Business Central

(0) ShareShare
ReportReport
Posted on by 202

Hi,

I want to create a page that can add and remove the page control on a page based on a parameter table that contains the list of all the fields that should be shown if the table flag is activated.

pastedimage1585203357962v3.png

I think this table design can be implemented in BC, but how to implement the page control out of this?

because the control must be created on the fly if there's an addition to the parameters table.

Thanks for your answer.

Best Regards,
Chaidir Ali Assegaf

  • Lars Lohndorf-Larsen Profile Picture
    Microsoft Employee on at

    Hi Chaidir,

    It sounds like what you need, is to use the page control property Visible, set that to a Boolean variable, which you can then calculate on the OnOpenPage trigger. I guess you already did investigate this route, and this did not work? Or if not, then let me know and I can elaborate it a bit,

    Lars

  • Chaidir Ali Assegaf Profile Picture
    202 on at

    Hi Lars Lohndorf-Larsen,

    yes, I already did investigate that route.

    but the problem is if there's happen to be an addition to the field which is done by putting a new record into the parameter table, how can the page control, ie. the textbox or the grid created without writing any field component to the repeater node for grid or to the group node for the textbox into the .al file.

    pastedimage1585212072358v1.png

    I can change the property visible to true easily by using various triggers if the field was available before publish. but, I don't know how to do it if the field was added after publishing the extension.

  • Lars Lohndorf-Larsen Profile Picture
    Microsoft Employee on at

    I see. In that case I am not sure if this is possible. I thought of defining a page with fields like Field1, Field2, and then use triggers to set caption and value dynamically, but this looks complex, and I am not sure we can even set for example Caption dynamically, or how to handle data types, or how to handle it if the page also needs to be editable.

    Or you could maybe generate a small tool to generate the .al page dynamically, as it's just a text file, but it would then still need to be imported and compiled. Or if this is for view-only, then maybe build an Excel spreadsheet instead.

    That's all I can think of, not ideal but I can't think of any simple solutions to this, maybe others can,

    Lars

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 665 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 418 Super User 2026 Season 2

#3
Teagen Boll Profile Picture

Teagen Boll 280 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans