Add Child of Incidents to Problem tickets
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi all,
We may attach a parent incident to a problem. Is there a way to add the list of child incidents to the problem? These are incidents where they are only attached to the parent - not the problem. Only the parent would be attached to the problem.
Thanks,
Cat
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Thank you Ankur, this is very helpful, I will check this out and then let you know how I get on!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
With this approach, you are duplicating data that already exists in the Incident record and then showing it again on the Problem record. My recommendation is to use the out-of-the-box (OOTB) approach unless there is a specific compliance requirement.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/dratulgrover [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
The request is that they can easily see how many incidents are affected by a problem. OOB I would have expected that it would link the child incidents. If the problem is only identified after the incidents have been closed, they would have to link every single incident to the problem rather than just the parent incident.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
this won't duplicate the data/records.
This will simply show the child incidents as related list
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
here is the working approach
1) create relationships from System Definition like this
(function refineQuery(current, parent) {
// get the incident associated with this problem and then get child of that parent
var rec = new GlideRecord('incident');
rec.addQuery('problem_id', parent.sys_id);
rec.query();
if (rec.next()) {
var parentInc = rec.getUniqueValue();
var childIncArr = [];
var gr = new GlideRecord("incident");
gr.addQuery("parent", parentInc).addOrCondition("parent_incident", parentInc);
gr.query();
while (gr.next()) {
childIncArr.push(gr.getUniqueValue());
}
current.addQuery('sys_id', 'IN', childIncArr.toString());
}
})(current, parent);
2) this Problem has parent as INC0010118
3) this INC is parent of 3 incidents
4) now add that related list on Problem form Right Click -> Configure Related List
5) then add that new related list to right side
Output: 3 child incidents now shown in related list on form
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
