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 :
Small and medium business | Business Central, N...
Suggested answer

How to hide and show dynamically actions on a page?

(0) ShareShare
ReportReport
Posted on by

Hey guys,

I would like to know, if I can hide and show dynamically actions on a page?

In the following image you can see my page, where I have two actions.

If one of both has been exectued, the other one should only be visable, but not be enabled.

How can I achieve this?

5707.system.PNG

Thank you ;)

I have the same question (0)
  • Community Member Profile Picture
    on at
    RE: How to hide and show dynamically actions on a page?

    Solution:

    In the underlying table of my page, where I have my actions, I added two new fields: WithData & WithoutData, both are from type boolean and they got the InitValue property = true. In the page I used the OnOpenPage trigger to set both fields again to true: WithData  := true; WithoutData := true; I extended my actions in that page by the property "Enabled". One action got Enabled=WithData and the other one Enabled=WithoutData. Then I extended the code of my actions by this lines:

    WithData := True;

    WithoutData := false;

    Modify();

    Commit();

    And for the other action the first two line just vice versa.

  • Community Member Profile Picture
    on at
    RE: How to hide and show dynamically actions on a page?

    I do not get it...

    I created two fields in the underlying table: WithData & WithoutData, both are boolean.

    Then I have my action, in their code I set the fields to true and false, right?

    Like this?

    0474.code.PNG

    Because now is no action visible.

    My page is a listpart where the actions are, maybe that makes some problems

  • Suggested answer
    Avinash B Profile Picture
    1,455 on at
    RE: How to hide and show dynamically actions on a page?

    Hi

    This could be one of the ways of doing it. Create a two field on the table and when the report is run make the corresponding boolean true.

    Based on this boolean make the visibility of the action.

    Regards

    Avinash B

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Mansi Soni – Community Spotlight

We are honored to recognize Mansi Soni as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

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

#1
Sohail Ahmed Profile Picture

Sohail Ahmed 2,899 Super User 2025 Season 2

#2
Sumit Singh Profile Picture

Sumit Singh 2,444

#3
Jeffrey Bulanadi Profile Picture

Jeffrey Bulanadi 2,304

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans