- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-25-2018 05:10 AM
If specific user from group get inactive then assign all incidents to his manager so that he will further can assign to available member from group.
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-25-2018 05:20 AM
You can write a business rule on user table
after / update
condition: active changes to false
Script:
var gr = new GlideRecord('incident');
gr.addQuery('active', true);
gr.addQuery('assigned_to.sys_id', ''+current.sys_id);
gr.setWorkflow(false);//use this if you dont need any BRs to trigger , else dont
gr.query();
while(gr.next())
{
gr.assigned_to=current.manager;
gr.update();
}
-Anurag Tripathi
Please mark my answer correct/helpful if it solved your issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-25-2018 05:20 AM
You can write a business rule on user table
after / update
condition: active changes to false
Script:
var gr = new GlideRecord('incident');
gr.addQuery('active', true);
gr.addQuery('assigned_to.sys_id', ''+current.sys_id);
gr.setWorkflow(false);//use this if you dont need any BRs to trigger , else dont
gr.query();
while(gr.next())
{
gr.assigned_to=current.manager;
gr.update();
}
-Anurag Tripathi
Please mark my answer correct/helpful if it solved your issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-26-2018 06:17 AM
Hey Mate, did you try this?
If you dont need anything else then please close this thread by marking an answer correct.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-25-2018 06:46 AM
Hi Micky,
1. Create Business rule on Update and when active changes to false.
2. Code to re-assign all active incidents at once.
var gr = new GlideRecord('incident');
gr.addQuery('active', true);
gr.addQuery('assigned_to', current.getUniqueValue());
gr.setValue('assigned_to', current.manager);
gr.updateMultiple();
Cheers,
Sunil B N