- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-26-2018 01:58 AM
I have a requirement like all software assignment group incidents have to assign to network group only by the network group members.How to achieve this?
Regards,
Gokulraj S
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-26-2018 04:38 AM
It hasn't updated the record, you can another line to return it to the previous value.
if(!gs.getUser().isMemberOf('Network') && current.assignment_group.getDisplayValue() == 'Network'){
gs.addErrorMessage('only Network team members can assign to the Network group');
current.assignment_group = previous.assignment_group; //revert to previous value
current.setAbortAction(true);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-26-2018 02:35 AM
Hi gokulraj,
Change the Assignment Group.
Regards,
Roehl Tablada
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-26-2018 02:38 AM
That change should done only by network group members not by any other group member.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-26-2018 02:43 AM
Hi gokulraj,
Then there's no way around it. Email them to act on the incident.
Regards,
Roehl Tablada
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-26-2018 03:24 AM
Hi Gokulraj,
You could create another script include for the assignment group to exclude the network group as an option if the currently logged in user is not a member of the network team.
I'm not sure if there isn't a better way to do it though, you might find your requirements for assignment groups become quite prescriptive and you have a large unmanageable script include accounting for a large number of different situations.
Logic would look something like this though, if this is the potential rabbit hole you want to go down.
var groups = 'sys_id=1234'
if(!gs.getUser().isMemberOf('Network')){
var gr = new GlideRecord('sys_user_group');
gr.addQuery('name', '!=', 'Network');
gr.query();
while(gr.next()){
groups += ('^ORsys_id=' + gr.sys_id);
}
}