How to Link SLA breach emails from TASK SLA table to Incident worknotes activity stream

SAS21
Tera Guru

Hi,

Have a requirement to see the SLA breach emails in the Incident Activity stream like how other emails we see eg when incident is resolved. I am trying to copy the emails from task sla to incident using a before insert Business rule  and in filter condition using  type is sent ready and target table is task sla

making sure only emails are copied for only the below mentioned notifications.

 

here is the code

var notifications = ['CSC - INC SLA notification for 50%,70%',
        'INC SLA notification for 80%',
        'CSC - INC SLA breached'
    ];
    var notif_name = current.notification.getDisplayValue();
    gs.info('found notif' + notif_name);
    if (notifications.indexOf(notif_name) > -1) {
        var slaGR = new GlideRecord('task_sla');
        if (slaGR.get(current.instance)) {
            if (slaGR.task.sys_class_name == 'incident') {
                current.target_table = 'incident';
                current.instance = slaGR.task;
            }
        }
    }
 
its not working... Appreciate the help.
 
Thank you
 
0 REPLIES 0