Close date is not updating on parent ticket
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2024 06:44 AM
Hi,
i facing issue on the auto closure of case, whenever i auto close flow is executing the parent ticket closed date is not updating even state is marked as closed complete.
Here parent table is custom table extended from task table, when the user is manually updating child case, parent ticket is working as expected but when the child case closing through auto close flow, closed date is not updating and parent ticket is in active state. which is not expected.
i tried creating custom BR on child case as well as on parent table but it is not working.
i also tried dictionary attributes on custom table as well where i have set this value close_state =3; but this is not working.
can any one suggest me any solution how i can solve this issue?
thanks in advance...!!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2024 07:48 AM
Hi @Priyansh_98 ,
You can create after update business rule on child table and query the parent table and set the value,But make sure that child table has a reference field which store parent field value
Here i tried for Ritm(parent) and sc task (child)
(function executeRule(current, previous /*null when async*/) {
var ritm = new GlideRecord('sc_req_item');
ritm.addQuery('sys_id', current.request_item); //here query the sys id of parent table with child table reference field
gs.addInfoMessage("line num " + current.request_item);
ritm.query();
if(ritm.next()){
ritm.state = '3'; //set state with closed complete backened value
ritm.closed_at = current.closed_at;
ritm.update();
}
})(current, previous);
Please mark this comment as Correct Answer/Helpful if it helped you.
Regards,
Swathi Sarang

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2024 08:21 AM
@Priyansh_98 Could you please share the snapshot of what you have tried so far. I will suggest the corrections accordigly.