- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-12-2017 07:21 AM
I have a UI Action in Incident form
I want the UI Action to be only visible to users having itil role
So I restricted the UI Action visibility by mention the condition field as gs.hasRole('itil')
But the UI Action is visible to admin users also..
Whether all the UI Actions are visible to all admin role users..?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-12-2017 07:23 AM
Hi Eswari,
In general, admin role includes all other roles. If you use gs.hasRole("itil"), your admins will see this also. It's just how the system works.
Base System Roles - ServiceNow Wiki

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-12-2017 07:29 AM
Oddly, that method only exists on the client side and cannot be used in the condition of a UI action (server side.) There's no GlideSystem (gs.) equivalent to hasRoleExactly()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-12-2017 07:35 AM
bump, i too just noticed that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-12-2017 08:22 AM
Try this if admins must not have this access:
gs.hasRole("itil") && !gs.hasRole("admin")