- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-05-2017 12:14 AM
What condition shall I put on VIEW context menu so that admin can see the view but itil cannot.
Actually admin has itil role by default.
Please do answer the condition .
Thank you
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-05-2017 12:27 AM
Hi Manisha,
The condition should be as of below. You just need to add the bold portion.
ListProperties.canChangeView() && gs.hasRightsTo('ui/context_menu.view/read', null) && gs.hasRole("admin")
I hope this helps. Please mark correct/helpful based on impact

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-05-2017 12:22 AM
Hi Manisha,
You can try by putting below condition:
gs.hasRole("admin")
Regards,
Anjali
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-05-2017 12:23 AM
Hi Manisha,
I dont think there is any problem if admin user has ITIL role. Problem arises when ITIL contains Admin role.
Not sure what is your requirement here.
Please elaborate.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-05-2017 12:24 AM
Hello Manisha,
Refer the below link may helpful to you.
Customize List v2 context menus
http://wiki.servicenow.com/index.php?title=Context_Menus#gsc.tab=0
ServiceNow Commnunity MVP -2018 class.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-05-2017 12:25 AM
Hi Manisha,
What is the name of the context menu you want to show/hide based on role?
Can you explain your requirement in details?
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader