Project Portfolio Management Knowledge Base
Showing results for 
Search instead for 
Do you mean 

Hide Cancel Request button

by on ‎09-27-2012 07:48 AM



Is there a way I can hide the out of the box Cancel Request button at a certain status?


You can use a customized UI rule.

Here is a ui rule to hide an action button. just modify it to hide cancel button:

function hideWFButton(buttonLabel, flag) {
 //Check if user have the rights to perform workflow action
 if(null != document.getElementById("DIV_EC_REQUEST_WF_AVAILABLE_ACTIONS")) {
  var wf_buttons;
  var links;
  var newDisplay;
  wf_buttons = document.getElementById("DIV_EC_REQUEST_WF_AVAILABLE_ACTIONS");
  links = wf_buttons.getElementsByTagName("a");
  //determin the new style
  if(flag) {
   newDisplay = "none";
  } else {
   newDisplay = "table-cell";
  //go through all buttons
  for(var i = 0; i<links.length; i++) {
   //if button matches with given name, aply the new style to the button
   if(links[i].firstChild.nodeValue == buttonLabel) {
    links[i] = newDisplay;