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

Notifications

Announcements

No record found.

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!

I have the same question (0)
  • Verified answer
    Bipin D365 Profile Picture
    28,983 Moderator on at

    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 

  • MBaba Profile Picture
    92 on at

    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.

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
Martin Dráb Profile Picture

Martin Dráb 41 Most Valuable Professional

#2
iampranjal Profile Picture

iampranjal 39

#3
Satyam Prakash Profile Picture

Satyam Prakash 35

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans