How to remove items from Context Menu
search cancel

How to remove items from Context Menu


Article ID: 54572


Updated On:


CA IT Asset Manager CA Software Asset Manager (CA SAM) ASSET PORTFOLIO MGMT- SERVER SUPPORT AUTOMATION- SERVER CA Service Desk Manager - Unified Self Service CA Service Desk Manager CA Service Management - Asset Portfolio Management CA Service Management - Service Desk Manager



When I use the right-mouse-click on an Incident number in the Incident list, I get a small menu. How can I remove an item from this menu?


For an example, you may wish to remove "Escalate" in the list below:

<Please see attached file for image>

Figure 1

The menu you see is the ContextMenu. As other menus, this can be customized in the sitemods.js file.

  1. copy %NX_ROOT%/sdk/scripts/sitemods.js to %NX_ROOT%/site/mods/www/wwwroot/scripts
  2. open the file for editing
  3. inside you will find the function siteContextMenuitemMod( )
  4. activate the function by removing the comments (//) and add the following code:
        function siteContextMenuitemMod(menuName, itemName)     {       if (window.propFormName=="list_in.htmpl") {          if (menuName=="idDetailsMenu") {          // Hiding the Escalate item from the right-click menu list          if (itemName=="Escalate...") {          return false;          }        }      }    }
  5. reboot the server
  6. clear the browser cache

Now it looks like this. The "Escalate?" is removed:

<Please see attached file for image>

Figure 2

Other ContextMenuitems can be removed in the same way.

If you want to remove items form other forms, you simply use the relevant modification function in the same way.

For example, to remove an item from the Issue list, then use "list_iss.htmpl", instead of "list_in.htmpl" in the code above.


Component: ARGIS


1558711961492000054572_sktwi1f5rjvs16sgw.gif get_app
1558711959544000054572_sktwi1f5rjvs16sgv.gif get_app