- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2022 12:09 AM
Once the SLA is breached the assignment group should be "abc"
so in the business rule i have given condition as "HasBreached is true "
so how to write script in advanced section so that it will set the assignemnet group on incident table
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2022 09:08 AM
HI,
Use the below..
var gr = new GlideRecord('sc_task');
gr.addQuery('sys_id',current.task);
gr.query();
if(gr.next())
{
gr.assignment_group = "sys id of the group name";
gr.update();
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2022 12:18 AM
Hi,
var id = current.task;
var inc = new GlideRecord('incident');
inc.addQuery('sys_id' , id);
inc.query();
if(inc.next()){
inc.setValue('assignment_group' , gs.getProperty('abc');
)
You should create a system property, to follow best practices
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2022 02:05 AM
Hi @snow
Create on After Update business rule on "task_sla" table.
In Advance script, write the below script
var gr = new GlideRecord('incident');
gr.addQuery('sys_id',current.task);
gr.query();
if(gr.next())
{
gr.assignment_group = "sys id of the group name";
gr.update();
}
I hope it helps, if so please mark it as HELPFUL and CORRECT.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2022 08:35 AM
@snow
Have you gone through my suggestion?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2022 08:50 AM
yes but the same thing i want on sc_task table