Sync fields from task SLA to HR Case

Drishti
Tera Guru

Hello Community,

 

There is field named "Actual Time Elapsed" on Task SLA . I have to copy the value to new field created on HR Case form. 
I have created after insert/update BR on task sla table . But the thing is this is getting update only one time. 
I want both the fields values to be same.

Below is the script used in BR :

var hr_case = new GlideRecord("sn_hr_core_case");
if(hr_case.get(current.task)) {
hr_case.setValue("u_sla_actual_elapsed_time", current.duration);
hr_case.autoSysFields(false);
hr_case.setWorkflow(false);
hr_case.update();
}

 

And condition is :

Actual Time Elapsed changes 

Please guide what else I can do get both field values same.

Thanks in advance!

5 REPLIES 5

@Drishti 

Hope you are doing good.

Did my reply answer your question?

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader