B
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-14-2024 12:11 AM - edited ‎08-14-2024 08:36 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-14-2024 12:31 AM
@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();
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-14-2024 03:12 AM
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.
Suresh.