How to add child incidents in related incident tab in problem form
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2025 10:04 AM
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2025 10:20 AM
Hi @panchbhaic ,
create a BR
on problem table
put this in the condition
current.first_reported_by_task && current.first_reported_by_task.sys_class_name=='incident'
script
(function executeRule(current, previous /*null when async*/) {
var orginalTask = current.getValue('first_reported_by_task');
var incGr = new GlideRecord('incident');
incGr.addEncodedQuery('parent_incident='+orginalTask+'^ORparent='+orginalTask);
incGr.query();
while(incGr.next()){
incGr.setValue('problem_id',current.getValue('sys_id'));
incGr.update();
}
})(current, previous);
or
you can also use the flow designer
Please mark my answer as helpful/correct if it resolves your query.
Regards,
Chaitanya