You are currently viewing How To Customize List Context Menu???

How To Customize List Context Menu???

Yes, it is possible to customize the out of box list context menus or create new menus for the desired table. This article guide you to customize the content and behavior of list context menus.

A video tutorial is available at the bottom, in case you need any assistance from it.

In the below image, I have add a new List Context Menu item “Filter Out Incident“.

Sample Context Menu

Steps To Customize List Context Menus

  • Navigate to All > System UI > UI Context Menus.
  • Click New.
  • Complete the form
  • Select Menu, Type, Parent & condition to proceed
  • For pre & post processing work on Action Script & OnShow Script.

What is an Action Script for the context menu?

  • The script runs when someone selects the context menu option.
  • This script is client-side and runs in the user’s browser.
  • JavaScript variables are available on action script are as follows
VariableDescription
g_listGlideList2 against which the script runs.
g_fieldNameName of the field against which the context menu runs.
g_fieldLabelLabel of the field against which the context menu runs.
g_sysIdThe sys_id of the row or form against which the script runs.

What is an OnShow Script of Context Menu?

  • The onShow script field defines a script that runs before the context menu is displayed
  • It is used to determine which options appear in the context menu.
  • You can use it to change the menu items on the list header menu based on the current field column
  • JavaScript variables are available on action script are as follows
VariableDescription
g_listGlideList2 against which the script runs.
g_fieldNameName of the field against which the context menu runs.
g_fieldLabelLabel of the field against which the context menu runs.
g_sysIdThe sys_id of the row or form against which the script runs.
g_menuContext menu to be displayed.
g_itemCurrent context menu item.

A Video Tutorial

Leave a Reply