- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-11-2025 02:04 AM
What I want is in problem table while creating the problem record there is one custom field Parent Incident which is referenced to Incident table.When I select the Incident record in the Parent Incident field and save the problem record then in related list of that problem record child incidents should be shown of that record selected in parent incident field.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-26-2025 12:58 AM
Hope you are doing good.
Did my reply answer your question?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-11-2025 05:44 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-11-2025 05:59 AM
you will have to create a defined relationship and use scripting in this table when you create new "sys_relationship"
Something like this
(function refineQuery(current, parent) {
// Add your code here, such as current.addQuery(field, value);
var parentIncident = parent.parent;
var arr = [];
var gr = new GlideRecord("incident");
gr.addEncodedQuery("parent_incident=" + parentIncident + "^ORparent=" + parentIncident);
gr.query();
while (gr.next()) {
arr.push(gr.getUniqueValue());
}
current.addQuery('sys_id', 'IN', arr.toString());
})(current, parent);
Then save this and add this related list on Problem Form in Your View -> Configure Related Lists
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-26-2025 12:58 AM
Hope you are doing good.
Did my reply answer your question?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader