SLA should stop when email communication is made on incident

Deepika Gangra1
Tera Expert

Hi,

SLA should stop when any email communication is made on incident. Email is send via quick message.

 

Thanks in advance

 

Deepika

12 REPLIES 12

Amit Gujarathi
Giga Sage
Giga Sage

HI @Deepika Gangra1 ,
I trust you are doing great.
Please find below script of business rule for the same

(function executeRule(current, previous /*null when async*/) {

    // Check if the email is related to an Incident
    if (current.target_table == 'incident') {
        var incidentGR = new GlideRecord('incident');
        
        // Query the incident table with the incident sys_id
        if (incidentGR.get(current.instance)) {
            // Set the 'Email Responded' field to true
            incidentGR.setValue('email_responded', true);
            incidentGR.update();
        }
    }

})(current, previous);

Was this answer helpful?


Please consider marking it correct or helpful.


Your feedback helps us improve!


Thank you!


Regards,


Amit Gujrathi



Hi Amit,

Thank you for reply.

is this script runs on sys_email table and hope you got my requirement( when user sends email from quick message to the customer, sla should stop).

 

Thanks

Deepika  

Hi Amit/,

I have tried with the same script but it didn't work.

Please help.

 

Thanks

Deepika