- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2020 01:13 AM
Hi All,
I need to get the data from breach time(planned end date) field in task_sla table and get it displayed in custom field in incident table form.I have tried many business rules by taking reference from community only but i cant able to get it.Can anyone help me giving the exact script required for it.Lets take the custom field as Date,Time(u_date_time).
Thanks,
Arjun.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2020 12:40 AM
Hello Arjun,
You need to write before insert & update business rule on task_sla table. Also add condition as SLA definition changes in condition builder.
if (current.task.sys_class_name == 'incident') {
var gr = new GlideRecord('incident');
if (gr.get(current.task.sys_id)) {
gr.u_breach_date_time = current.planned_end_time; // it will set the breach date-time in custom field of type date/time on incident form.
gr.update();
}
}
It will gives you current SLA planned end time.
Hope this will help you.
Regards,
Sagar Pagar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2020 12:40 AM
Hello Arjun,
You need to write before insert & update business rule on task_sla table. Also add condition as SLA definition changes in condition builder.
if (current.task.sys_class_name == 'incident') {
var gr = new GlideRecord('incident');
if (gr.get(current.task.sys_id)) {
gr.u_breach_date_time = current.planned_end_time; // it will set the breach date-time in custom field of type date/time on incident form.
gr.update();
}
}
It will gives you current SLA planned end time.
Hope this will help you.
Regards,
Sagar Pagar