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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Suggested Answer

Hiding button on the subgrid

(2) ShareShare
ReportReport
Posted on by 4
Hi,
 
I have a subgrid in the form used in the model driven app, it it has button +Add existing item. I want to hide that button. I have a limitation that my organisation won't allow to use XRM Tool box. I have also tried to hide my command bar but the hide option was disabled. Is there any other way to do it. 
 
Your response is greatly appreciated, Thanks
Categories:
I have the same question (0)
  • Subra Profile Picture
    1,247 on at
    Hi @Abhishek,

    Could you please let us know which product you are using and based on that we can provide the suggestions.
     
  • Suggested answer
    Vish WR Profile Picture
    13 on at
     
    Which product you use helps us provide the solution 
     
    Using setVisible(false) on the subgrid control hides the entire thing, not just the "Add Existing" button. That is obviously not a useful fix if you still need the grid to be visible for your users. 

    Instead, you should target the command bar button itself rather than the control. Since XrmToolbox isn't available and the native option is greyed out, use the Command Designer in Power Apps. You can apply a display rule to the "Add Existing" button that simply returns false (or use one that is condition-based).

    If you are forced to use classic customizations, you can still use a small JavaScript ribbon rule that returns false. Just make sure it is applied as a button visibility rule, not by calling setVisible.

    Basically, do not hide the whole grid. Just use command bar rules to hide the button instead.

    Vishnu WR
     
    Please  Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider answering Yes to Was this reply helpful? or give it a Like 

     
  • Suggested answer
    11manish Profile Picture
    842 on at
    Since your organization does not allow XrmToolBox and the modern command hide option is disabled, the best supported alternatives are:
    • Modify the relationship behavior used by the subgrid
    • Restrict Append/Append To permissions through security roles
    • Use modern Command Designer if available for that specific subgrid (probably, It doesn't allow the OOB Button to modify).
    • Avoid unsupported JavaScript/CSS hiding unless absolutely necessary
    In most environments, adjusting relationship/security behavior is the safest and most supportable solution for hiding the “+ Add Existing” button.

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 Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

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

#1
Subra Profile Picture

Subra 148

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 99 Super User 2026 Season 1

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 85 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans