On problem form, there should be a field problem owner ans user can only
select those users in the field who has problem_manager role.
var prbFunctions = Class.create();
prbFunctions.prototype = {
initialize: function() {},
getprbmanagers: function() {
var gr = new GlideRecord('sys_user_has_role');
gr.addQuery('role', 'b573c1f9538823004247ddeeff7b12e0');
gr.query();
while (gr.next()) {
var prbmanagers = prbmanagers + ',' + gr.user;
}
var result = 'sys_idIN' + prbmanagers;
return result;
},
type: 'prbFunctions'
};