For some user experience issues, sometimes you may want to hide the + button on a subgrid. This is how to proceed:
If not already done, download JQuery and add it to your webresources then add the following HTML code as a webresource in the form containing your subgrid.
<script src=”/webresources/new_Jquery.js”></script>
<script>
$( document ).ready(function() {
if (parent.document.getElementById(“subgridname_contextualButtonsContainer”) != null ) {parent.document.getElementById(“subgridname_contextualButtonsContainer”).style.display=’none’;}
});
</script>
Where subgridname must be replaced by your subgrid name.
IMPORTANT: Hiding the + button does not mean users cannot create new records, allowing or forbidding users to create new records should necessary be configured in their security roles.
.
I have tried this code in a webresource to try and hide the subgrid add button with no joy. Is there anything else I need to know to get it working?
Hello Matt,
Sorry for being late. As suggested in this post, did you add Jquery to your webresources and edit the line http://â/webresources/new_Jquery.jsâ with the right link to it?
Regards
[…] For some user experience issues, sometimes you may want to hide the + button on a subgrid. This is how to proceed: If not already done, download JQuery and add it to your webresources then add the following HTML code as a webresource in the form containing your subgrid. /webresources/new_Jquery.js $( document ).ready(function() {… […]
I am using CRM 2015 update 2 .
I have 2 subgrids of “XYZ” entity on account entity form i would like to apply different tooltip for each Subgrid + button..
I have one question
document.getElementById(“subgridname_contextualButtonsContainer”).style.display=’none’;
Is it Supported way of coading in CRM / is it supported to access controls by document.getElementById(“”) ? will it break in future CRM versions .