User Reference field return only ITIL roles

leslie8
Mega Expert

I am working on a global table sys_email_canned_message.

I want to limit the "User" field to pull only users who have the ITIL role. I have tried the instructions listed in this link, where I create an Advanced Reference Qualifier on the field that calls a built-in business rule getRoledUsers.

I have attempted to add this line to the Advanced Reference qualifier. It does not work, the user field still returns all users even those without the ITIL role. Do I need to create a separate script include and call it with a reference qualifier instead of calling the existing business rule?

javascript:"sys_idIN"+getRoledUsers("IN","itil").join(",").

http://wiki.servicenow.com/index.php?title=Reference_Qualifiers#JavaScript_Example:_Limiting_the_Ass...

1 ACCEPTED SOLUTION

Jim Coyne
Kilo Patron

Take a look at the Dictionary Entry for the "Task.Assigned to" field (Incident, Problem, etc...):


task.png


It uses a Simple reference qualifier of "Roles is itil".   It works regardless of how many roles the user has.


View solution in original post

3 REPLIES 3

Jim Coyne
Kilo Patron

Take a look at the Dictionary Entry for the "Task.Assigned to" field (Incident, Problem, etc...):


task.png


It uses a Simple reference qualifier of "Roles is itil".   It works regardless of how many roles the user has.


Thank you Jim! That's great. I got the other one to work too (I had a spelling mistake in my advanced qualifier). Anyway your solution is much more elegant! Thanks so much.


You are welcome!