Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2017 06:11 PM
Would you like to do this.
Script Include:
Name: RoleUtilities
Script:
var RoleUtilities = Class.create();
RoleUtilities.prototype = Object.extendsObject(AbstractAjaxProcessor, {
getRoledUsers : function(){
var arr=[];
var gr = new GlideRecord('sys_user_has_role');
gr.addQuery('role.name','itil_admin');
gr.query();
while(gr.next()){
arr.push(gr.user);
}
return 'sys_idIN'+arr;
},
type: 'RoleUtilities'
});
Reference Qualifier:
javascript: new RoleUtilities().getRoledUsers();