Announcements
No record found.
Hi,
I have a access team subgrid on a custom form and want to hide if the record status is closed. My question is:
How to hide add user + button from a Access Team Subgrid?
Can someone please help on this?
Thanks!
Hi partner,
Actually I haven't try this with Access Team, but you could refer to this way.
You could add your entity to a solution and open this solution in RibbonWorkBench tool.
And in subgrid level find the + button and hide it and then publish the solution.
For example, if I want to hide the + button in account form subgrid, I should add the account entity to an solution first and then open the solution in ribbonworkbench.
And then find the button and hide it.
About how to install ribbonworkbench, you could refer to this blog.
https://ribbonworkbench.uservoice.com/knowledgebase/articles/71374-1-getting-started-with-the-ribbon-workbench
Here are also some similar posts for you.
https://community.dynamics.com/crm/f/117/t/244901
https://www.inogic.com/blog/2017/01/hide-add-button-on-a-subgrid-by-applying-custom-javascript-rule/
Hope it helps.
Best Regards,
Leo
Thanks Leo for all information!
I do use ribbonworkbench. But for the access team gird, I don't know which button (+) to customise on ribbon. I tried to hide all add new (+) on entity 'systemuser' but no luck. The "+" sign still shows up.
Jane
Hi Jane88,
I also tried to add an access team subgrid to my account form and wanted to hide the + button by ribbonworkbench but didn't work.
Looks like that we could only hide it by catch its DOM and set display to none by js code.
Thanks Leo for your help!
If my answer helped you, please mark my answer as verified so that we could help more other users with similar issues.
Have a nice day.
I tried to use JS code to set display to none, but document.getelementbyid doesn't work. I found the following article:
community.dynamics.com/.../261103
document.getelementbyid is un-supported in D365. So I can't use JS.
Good day Jane88,
Actually, D365 supports Native JavaScript, I've done it in my instance with "document.getelementbyid", here is my code.
var hide = true; var interval = null; function hidebackButton(){ interval = setInterval(function () { var element = parent.document.getElementById("AccessAccounts_Team_contextualButtonsContainer"); if (element != null && hide == true) { hide = false; element.style.display = "none"; clearInterval(interval); } }, 1000); }
Just copy this code to Onload event of your form, and replace the "AccessAccounts_Team_contextualButtonsContainer" with your own add button id which could be found in F12 development tools.
Hi Leo,
I found the id, but for this line of code:
parent.document.getElementById("gridSAMAccessTeam_contextualButtonsContainer"), I got element not defined error.
Where is your AccessTeam subgrid? Is it on the default tab on the form so that the system could be able to get it when onloading the form.
For example, my AccessTeam is on the account main form Summary tab which means once you open the form, you can see the subgrid directly. If the tab which your subgrid is in needs to be clicked before it can be displayed, you should move the subgrid to your default tab or set the tab as default.
Could you kindly share your screenshot about your entity form and your access team position?
Thanks Leo!
The access team is located on the second tab on our custom entity (main form). It is visible by default. I don't know how to set the tab with the access team to default tab. I can't find the option/settings to set the default tab.
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.
Congratulations to a top community star!
In our never-ending quest to help the Dynamics 365 Community members get answers faster …
Welcome to the next edition of the Community Platform Update. This is a status …
Stay up to date on forum activity by subscribing.