Hide subgrid add button (+)

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.

 

 

 

 

 

.

Advertisements

3 thoughts on “Hide subgrid add button (+)

  1. 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?

  2. […] 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() {…  […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s