- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-05-2019 05:53 AM
I want to close all child incidents before closing parent incident, if any one child incident not closed the parent incident should not be close?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-05-2019 07:08 AM
Hi Venkat,
Create an before update Business rule on incident table and add the condition as State changes to Resolved.
var rec = new GlideRecord('incident');
rec.addQuery('parent', current.sys_id);
rec.addQuery('state', 'IN', '1,2,3'); // Replace your incident state values like New, Work in progress, etc., except resolved or closed
rec.query();
if(rec.next()) {
gs.addErrorMessage("There is an active child incident, please resolve the child incident, before closing parent');
current.setAbortAction(true);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-05-2019 07:28 AM
Hi,
I have a similar requirement.
When a child incident is created, the parent state is work in progress read-only. When all the child incidents are completed, the parent state should be editable. How can I do that?
I set the state to read-only using a UI policy.