UI Action Visibility

eswarijk
Tera Contributor

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..?

1 ACCEPTED SOLUTION

Chuck Tomasi
Tera Patron

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


View solution in original post

7 REPLIES 7

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()


bump, i too just noticed that.


-Anurag

Try this if admins must not have this access:



gs.hasRole("itil") && !gs.hasRole("admin")