Close date is not updating on parent ticket

Priyansh_98
Tera Guru

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...!!!

2 REPLIES 2

swathisarang98
Giga Sage
Giga Sage

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)

swathisarang98_0-1710513983951.png

 

swathisarang98_1-1710514023328.png

 

 

(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

Sandeep Rajput
Tera Patron
Tera Patron

@Priyansh_98 Could you please share the snapshot of what you have tried so far. I will suggest the corrections accordigly.