javascript: new getDepartment().getDepartmentUsers(current.variables.caller_id);
Script Include Function:
getDepartmentUsers: function(department) { var usersList = []; var grUser = new GlideRecord('sys_user'); grUser.addQuery('department', department); grUser.query(); while(grUser.next()) { usersList.push(grUser.getUniqueValue()); } return 'sys_idIN' + usersList; },
Advanced Reference Qualifier Using a Script Include ServiceNow
admin Changed status to publish December 19, 2023