How to remove options from select box if user is not part of assignment group
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2023 03:25 AM - edited 08-09-2023 04:30 AM
Hi,
I have a requirement where i have to remove options from select box if user is not part of the group.
but i have around 50 groups in which 1 is incident group and other 49 starts with IN - Incident, SO i need to add condition in script include, my below script is not working
var getgroup = Class.create();
getgroup.prototype = Object.extendsObject(AbstractAjaxProcessor, {
getFulfillmentUsers : function(current){
var grUsers = [];
var grMember = new GlideRecord('sys_user_grmember');
grMember.addEncodedQuery('group.name=Incident^ORgroup.nameSTARTSWITHIN - Incident^user=' + usrID);
grMember.query();
while (grMember.next()) {
grUsers.push(grMember.user.sys_id.toString());
}
return grUsers.toString();
},
type: 'getgroup'
});
Can someone help me with the Script include and client script
0 REPLIES 0