Remove Action Buttons using client side script

By | January 25, 2012

We had posted much detailed content earlier for removing buttons from standard screens using client side scripts. This is in continuation with the same.
When you are customize any List or Summary screen you can find there are lots of action buttons available on right hand side; for example communication search screen. On this screen you can see Find,Clear and Help buttons.  Along with these buttons you can also see more action buttons like New Task, New Email etc.
Our previous blogs were regarding removing one button at a time. If we want to remove multiple buttons it becomes quite cumbersome task. So  to do it at one go like removing the entire section of action buttons only you can use below script. Below script removes all the action buttons like New Task, New Email etc in above example.
//’ This function use for Remove Action Button
//’ Paramters:- ClassName for button to be removed
//’ For e.g. “WorkflowGroup”
function RemoveActionButton(ClassName)
{
 var alltags = document.all? document.all :  document.getElementsByTagName(“*”);
 for(i=0; i<alltags.length; i++)
 {
  var myTD = alltags[i];
  if(alltags[i].className==ClassName)
  {
   alltags[i].style.visibility = hidden;
  }
 }
}