Create a JavaScript web resource with following functions.
function AttachHideEvent()
{
document.getElementById("crmGrid_SavedNewQuerySelector").setAttribute('onclick','HideItems();');
$( "#crmGrid_SavedNewQuerySelector" ).mouseout(function() { HideItems(); });
}
function HideItems()
{
if(document.getElementById("ViewSelector_fax")
!=null)
{
//fax
document.getElementById("ViewSelector_fax").style.visibility = "hidden";
document.getElementById("ViewSelector_fax").style.height="0px";
document.getElementById("ViewSelector_fax").style.float="left";
//Letter
document.getElementById("ViewSelector_letter").style.visibility = "hidden";
document.getElementById("ViewSelector_letter").style.height="0px";
document.getElementById("ViewSelector_letter").style.float="left";
}
}
Then add a enable rule to first button on activities homepage
ribbon and call this function with default value = true/ function name= AttachHideEvent/
webresource=web resource created.
In 2nd function add activities you want to hide from
dropdown.
3 comments:
I tried to hide the activities from the activity list which has been posted by you.
But the script is not firing on load of activity home page. Can you please guide me how to hide the system activities from the view list.
did you add the event via "Ribbon Workbench 2013"?? after creating a Enable Rule there is no option to insert a javascript there..
after creating the Enable Rule I can't attach any .JS
I am using Dynamics CRM 2013 and Ribbon Workbench 2013
Post a Comment