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...
Suggested Answer

Disable an action on list page

(0) ShareShare
ReportReport
Posted on by 22

Hi All,

On a list page, if no records are there, then I want certain actions on the page to be disabled. Whereas when records are there, actions should be enabled.

Please guide me through the logic.

Thanks!!

  • Suggested answer
    Mohana Yadav Profile Picture
    61,252 Super User 2026 Season 2 on at

    you can use enable/visible property with "NOT ISEMPTY".

  • Praveen A Profile Picture
    22 on at

    I have written the following code on the page:

    trigger OnOpenPage()

       var

           myInt: Integer;

           TariffModelRec: Record "NBCX Tariff Model";

       begin

           varIsEmpty := TariffModelRec.ISEMPTY;

    and then set Enabled = NOT varIsEmpty

    But this code will fired when the pages gets open. Whenever user will not close the page and perform these changes, then the actions won't be enabled /disabled. What to do in this case ?

  • Suggested answer
    Mohana Yadav Profile Picture
    61,252 Super User 2026 Season 2 on at

    Use OnAfterGetRecord

  • Praveen A Profile Picture
    22 on at

    OnAfterGetRecord is not working in case the list page is totally empty

  • Suggested answer
    Mohana Yadav Profile Picture
    61,252 Super User 2026 Season 2 on at

    Use this as

    varIsEmpty := NOT TariffModelRec.ISEMPTY;

    and assign varIsEmpty to property.

  • Suggested answer
    Mohana Yadav Profile Picture
    61,252 Super User 2026 Season 2 on at

    Did you try "NOT ISEMPTY" without variables?

  • Praveen A Profile Picture
    22 on at

    No, I did not try without using variables. I tried the way I explained in my previous post..

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

Congratulations to the August Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 741 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 514 Super User 2026 Season 2

#3
AndrewThomas81 Profile Picture

AndrewThomas81 336 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans