How to remove the Bar Chart and Pie Chart of the Dashboards' report list / List view of records


Description

The Bar Chart and Pie Chart options on the dropdown menu are UI context menu that can be found in the Context Menu table (sys_ui_context_menu ).
You can append the below URI to your instance name in order to see the specific records for Bar and Pie chart context menu items:

https://<instance_name>.service-now.com/nav_to.do?uri=%2Fsys_ui_context_menu_list.do%3Fsysparm_query%3DnameSTARTSWITHpie%5EORnameSTARTSWITHbar%26sysparm_first_row%3D1%26sysparm_view%3D

Resolution

- Go to the UI Context menu 
- In the condition add && (ListProperties.getTable() != ‘incident’) to exclude only incident table from the context menu 
- Similarly adding the condition && gs.hasRole(“itil”) will restrict the context menu for certain role (itil in this case) 
- In case you want the option to be removed from the context menu on all forms (the drop-down menu on the report as well as the list view), you can mark them as active false.

Additional Information

To find more on form context menus, go to the below link:

https://docs.servicenow.com/csh?topicname=c_FormContextMenu.html&version=latest