- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-25-2018 01:07 AM
My requirement is to hide the user1 from assigned to when selecting the assignment group while creating an incident ,but the user must be a member in the group.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-25-2018 05:51 AM
This needs to be added as an advnaced reference qualifier to the assigned_to field, not assignment_group.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-25-2018 05:51 AM
This needs to be added as an advnaced reference qualifier to the assigned_to field, not assignment_group.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-25-2018 06:00 AM
Hey David Dubuis
You are right I have changed that to assigned_to field .It is working fine for the network group but when I choose other group I was not able see the assigned to members.Please refer the below images.
when I choose the assignment group as software no user is available.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-25-2018 06:03 AM
add in an else statement:
var excludeUser = Class.create();
excludeUser.prototype = {
initialize: function() {
},
excludeUser:function() {
var users = "sys_id=1234";
if(current.assignment_group.getDisplayValue() == 'Network'){
var gr = new GlideRecord('sys_user_grmember');
gr.addEncodedQuery('group=' + current.assignment_group + '^user!=9ee1b13dc6112271007f9d0efdb69cd0');
gr.query();
while(gr.next()) {
var user = gr.getValue('user');
users += ("^ORsys_id=" + user);
}
}
else{
var gr = new GlideRecord('sys_user_grmember');
gr.addEncodedQuery('group=' + current.assignment_group);
gr.query();
while(gr.next()) {
var user = gr.getValue('user');
users += ("^ORsys_id=" + user);
}
}
return users;
},
type: 'excludeUser'
};
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-25-2018 06:11 AM
Hey David,
Thanks for the guidance.It works exactly as per my requirement.you rocked...!!!!!!!!!!!!!!!!!!!!!
Regards,
Gokulraj S.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-25-2018 07:04 AM
Hey David Dubuis
What is the use of these two lines.
var users = "sys_id=1234";
users += ("^ORsys_id=" + user);