Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Answered

Hide a button from one of the two subgrids found on same entity form

(0) ShareShare
ReportReport
Posted on by 92

Hello,

I hope someone can answer my question.

I have two subgrids of the same entity on the same form. One is in the job description tab and the other is in the Areas of Responsibility tab. I want to hide the add new and add existing buttons in the subgrid found in the job description tab.
Does anyone have an approach to hiding a button from one of the subgrids?

I tried to use a custom enable rule using workbench on tab state, but it is still not working.

I would really appreciate your help!

The answer is:

pastedimage1661602181912v1.png

pastedimage1661602199964v2.png


Thank you!

  • MBaba Profile Picture
    92 on at
    RE: Hide a button from one of the two subgrids found on same entity form

    Hello,

    I tried creating a js based on the expanded tab:

    function ButtonVisi (context) {

       console.log(formContext.ui.tabs.get(8).getDisplayState());

       if (formContext.ui.tabs.get(8).getDisplayState() == "expanded"){

           return false;

       }

       else {

           return true;

       }

    }

    but the buttons are still visible on both subgrids.

  • Verified answer
    Bipin D365 Profile Picture
    28,981 Moderator on at
    RE: Hide a button from one of the two subgrids found on same entity form

    Hi,

    How about writing javascript enable rule to hide button based on Tab collapse state and Tab name eq your tab where you want your button to be hidden 

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

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Daivat Vartak (v-9davar) Profile Picture

Daivat Vartak (v-9d... 181 Super User 2025 Season 1

#2
Siv Sagar Profile Picture

Siv Sagar 149 Super User 2025 Season 1

#3
Vahid Ghafarpour Profile Picture

Vahid Ghafarpour 124 Super User 2025 Season 1

Product updates

Dynamics 365 release plans