Monday, 21 January 2008

Accessing Manual Workflow for Activities

I have noticed that many people want to run manual workflow rules against activities, such as marking a whole lot of email activities as COMPLETED, but have been frustrated that there is no ApplyRule option on the activities grid toolbar, meaning you have to drill into each one to get the menu option.

Does anyone know why? Anyway, I decided to add a button right back there and try it - well it appears to work! Simply use the following function on loading the home_activities.aspx page.

<script>
function addApplyRuleBtn(){
//var t = document.getElementById("mnuBar1");//get the toolbar
d = document.getElementById("_MBdoActioncrmGrid4200delete");
ar = d.cloneNode(true);
ar.id = "_MBdoActioncrmGrid4200applyrule";
ar.title = "Apply Rule";
ar.action = "doAction('crmGrid', '4200', 'applyrule')";
ar.firstChild.firstChild.src="/_imgs/ico_18_4212.gif";
d.parentElement.appendChild(ar);
}
</script>


Of course this is unsupported, but really quite minimally invasive.

No comments: