- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2024 10:25 AM
In the Incident form new related list should be added which displays the sla records of the child incidents of that particular incident.
How to achieve this functionality.
Thanks in advance
Bhargavi.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2024 01:20 PM - edited 07-19-2024 01:21 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-22-2024 11:24 AM
@bhargavi143 , credit should go to @Mio Matsushita.
Please accept his solution, you can mark that "accepted solution" also.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2024 11:56 AM
Hello
This can be achieved through Relationship.
Go to [System Definition > Relationships] and create the following relationships in the sys_relationship table.
(function refineQuery(current, parent) {
var gr = new GlideRecord('incident');
gr.addQuery('parent', parent.sys_id);
gr.query();
sys_ids = [];
while (gr.next()) sys_ids.push(gr.sys_id.toString());
current.addQuery('task', 'IN', sys_ids);
current.query();
})(current, parent);Next, open the related list settings for the Incident table and add "Child Incidents SLAs".
The SLAs of the child incidents of the incident you are viewing are now displayed in the related list.
The screenshot shows the related list for the INC0010001(Parent) form.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2024 01:20 PM - edited 07-19-2024 01:21 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-22-2024 11:24 AM
@bhargavi143 , credit should go to @Mio Matsushita.
Please accept his solution, you can mark that "accepted solution" also.