B

Scotty88
Tera Contributor
 
2 REPLIES 2

Sandeep Rajput
Tera Patron
Tera Patron

@Scotty88 You need to identify the notifications which trigger during the closure of the case. Deactivate those notifications and trigger following script to close the cases in the resolved state.

 

var caseGR = new GlideRecord('sn_customerservice_case');
caseGR.addQuery('state', 'resolved'); //replace woth your resolved state value
caseGR.query();
while (caseGR.next()) {
    caseGR.state = 'closed_complete'; //replace with your closed complete state value
    caseGR.update();
}

ersureshbe
Giga Sage
Giga Sage

Hi,

 

It's achieveable. To create a script for closing the case, it is essential to write code that interacts with the 'sys_email' table to identify the cases attempting to send email notifications. In this script, two fields should be utilized: the subject and the type field.

 

The type field should be modified to 'send-ignored' for those cases where you wish to disable notifications. The subject field is instrumental in identifying the case, as it contains the case number within the subject line.

Regards,
Suresh.