Ravi Gaurav
Giga Sage

Hi @shiz 

 

Below demo code will help :- 

Use an After Update Business Rule on the u_actuant_times table.
When u_assigned_to changes, update the same field in related records of u_actuant_times_details.

Example:

 

 
(function executeRule(current, previous) { if (current.u_assigned_to.changes()) { var gr = new GlideRecord('u_actuant_times_details'); gr.addQuery('u_ref_Monday', current.sys_id) .addOrCondition('u_ref_Tuesday', current.sys_id) .addOrCondition('u_ref_Wednesday', current.sys_id) .addOrCondition('u_ref_Thursday', current.sys_id) .addOrCondition('u_ref_Friday', current.sys_id) .addOrCondition('u_ref_Saturday', current.sys_id) .addOrCondition('u_ref_Sunday', current.sys_id); gr.query(); while (gr.next()) { gr.u_assigned_to = current.u_assigned_to; gr.update(); } } })(current, previous);

 

This keeps both tables in sync whenever the Assigned To changes in the main table.

--------------------------------------------------------------------------------------------------------------------------


If you found my response helpful, I would greatly appreciate it if you could mark it as "Accepted Solution" and "Helpful."
Your support not only benefits the community but also encourages me to continue assisting. Thank you so much!

Thanks and Regards
Ravi Gaurav | ServiceNow MVP 2025,2024 | ServiceNow Practice Lead | Solution Architect
CGI
M.Tech in Data Science & AI

 YouTube: https://www.youtube.com/@learnservicenowwithravi
 LinkedIn: https://www.linkedin.com/in/ravi-gaurav-a67542aa/