Auto Close Lifecycle event case , once all child task gets close completed
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2024 10:14 AM
Hi All,
I am trying to auto close lifecycle event case , when all the child tasks gets close completed . I have some activity sets which are triggering after 15 days . So Once all the tasks gets closed completed , I want to close the Parent case.
I have written BR on sn_hr_le_activity_set_context - this table and after update . and using below code. but its not working as expected , all the child tasks are going into error state. Kindly help me on my below issue.
if (current.workflow_context.id.hr_service.getDisplayValue() == 'Request Leave of Absence' && current.state == 'finished') {
var gr = new GlideRecord('sn_hr_core_case');
gr.addQuery('sys_id', current.workflow_context.id);
gr.query();
gs.info('Parul 30 ' + gr.getRowCount());
if (gr.next()) {
gr.state = 3;
gr.update();
}
}
5 REPLIES 5
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2024 12:54 AM
Hello Sara the Scheduled Job name is " Auto close case".