- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2021 04:49 AM
When problem ticket closed then related incidents tickets should close automatically
Is there Out Of The Box way to achieve this?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2021 04:56 AM
Hello Author,
Please follow this link
Please mark Correct✅/helpful if applicable, thanks!!
Prasad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2021 04:56 AM
Hello Author,
Please follow this link
Please mark Correct✅/helpful if applicable, thanks!!
Prasad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2021 11:17 PM
Hello Harshad,
If you want to use OOB Business rule,
Thank You
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2021 05:02 AM
Hi Harshad,
I'm not aware of any OOTB functionality, but it can be accomplished with a pretty simple After Update Business Rule:
var incident = new GlideRecord("incident");
incident.addQuery("problem_id", "=", me.sys_id);
incident.query();
while (incident.next()) {
if ( incident.active == true ){
incident.setValue("state", IncidentState.CLOSED);
incident.setValue("active", false);
incident.setValue("rfc", me.rfc);
incident.setValue("work_notes", msg);
incident.setValue("close_code", me.u_close_code);
incident.setValue("close_notes", me.close_notes);
incident.update();
}
}
You can set whatever values for the incident you need in the body. I wrote this quite a while back and it still works fine.
Hope that helps.
:{)
Helpful and Correct tags are appreciated and help others to find information faster
:{)
Helpful and Correct tags are appreciated and help others to find information faster
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2021 05:22 AM
Hi Harshad Pasalkar,
You can refer below code for this.
var gr = new GlideRecord("incident");
gr.addActiveQuery();
gr.addQuery('problem_id',current.sys_id);
gr.query();
while(gr.next())
{
gr.state = '7';
gr.close_code = 'Solved';
gr.close_notes = "Related incidents got closed on closing of problem";
gr.update();
}
If this solution works for you, please mark it as helpful.
Regards,
Nikita Joshi