How to check the persons who are having ITIL role ?

sreenivassinsta
Tera Contributor

How to check the persons having ITIL role ?

1 ACCEPTED SOLUTION

Ashutosh Munot1
Kilo Patron
Kilo Patron

HI,

 

If you want to check it in business rule then use this:

gs.hasRole('itil'); //This is for logged in user

 

in client script you can use, for logged in user:

g_user.hasRole();

 

Link : https://www.servicenowguru.com/scripting/user-object-cheat-sheet/

 

If you have to check for someother user other than logged in user:

then you will have to query the table : sys_user_has_role and check if he has that role or not.

 

Thanks,

Ashutosh

View solution in original post

4 REPLIES 4

Jaspal Singh
Mega Patron
Mega Patron

Hi Sreenivas,

 

Look for sys_user_has_role table.

 

Also, you may refer link. Just replace abc in the URL with your instance name.

 

Thanks,

Jaspal Singh

 

Hit Helpful or Correct on the impact of response.

Ashutosh Munot1
Kilo Patron
Kilo Patron

HI,

 

If you want to check it in business rule then use this:

gs.hasRole('itil'); //This is for logged in user

 

in client script you can use, for logged in user:

g_user.hasRole();

 

Link : https://www.servicenowguru.com/scripting/user-object-cheat-sheet/

 

If you have to check for someother user other than logged in user:

then you will have to query the table : sys_user_has_role and check if he has that role or not.

 

Thanks,

Ashutosh

Vishal Khandve
Kilo Sage

Hi Sreeni,

navigate to users, in filter type below query

 

Thank you

Ashutosh Munot1
Kilo Patron
Kilo Patron

https://community.servicenow.com/community?id=community_question&sys_id=38038ba1dbd8dbc01dcaf3231f96192b