Hiding form components in Dynamics CRM 2013

With new release of CRM 2013 we can use Business Rules to do some simple actions based on conditions on the forms, but business rules are limited some how and most of the time i tend to use JavaScript to perform more specific actions on the form. one of these scenarios is explained below.

For hiding form components like buttons  in Dynamics CRM you can use IE developer (F12) or Firefox firebug  and javascript. here are the steps for hiding a grid + button on the form:

  • Open a sample record in CRM
  • If you are using IE, press F12 to fire up IE developer
  • In IE developer click on select arrow tool

arrow

  • with the arrow selected move to the area you want to hide, in this example a plus button  in grid (it will select the container that you want by hover over that area)selected
  • go the IE developer and look for the id=”xxxxxx” in the line selected id
  • Use this JavaScript code and update the code with Id that you’ve got from last step and run it onLoad event of form.
function hideButton()
{
var obj=document.getElementById("Your ID");
obj.style.display="none";
}

note: it’s unsupported customization.

Advertisements

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