Update Child Record Field from Parent Record Field

Sundar akula
Tera Contributor

Hello All,

I've created a Business Rule to update the child field record from the parent field record when it's modified, but the update isn't working.

Attached are the screenshots of the Issue

Let me know your inputs where I am missing something.

Sundarakula_0-1732291404749.png

Sundarakula_1-1732291420641.png

Sundarakula_2-1732291469479.png

Sundarakula_3-1732291489615.png

 

1 ACCEPTED SOLUTION

Anand Kumar P
Giga Patron
Giga Patron

Hi @Sundar akula ,

You have to create after update business rule on change_request table as reporting manager field on that table and use below script

 

(function executeRule current, previous /*null when async*/) l

var changeManager =current.request_manager.getDisplayValue();

var incidentMgn=new GlideRecord ('incident'); incidentMgn. addQuery (change_request', current.sys_id);

incidentMgn.query;

while (incidentMgn.next)(

incidentMgn.u_request_manager=changeManager;

incidentMgn. update();

}

 

Mark it as helpful and solution proposed if it serves your purpose.
Thanks,
Anand

 

View solution in original post

3 REPLIES 3

Anand Kumar P
Giga Patron
Giga Patron

Hi @Sundar akula ,

You have to create after update business rule on change_request table as reporting manager field on that table and use below script

 

(function executeRule current, previous /*null when async*/) l

var changeManager =current.request_manager.getDisplayValue();

var incidentMgn=new GlideRecord ('incident'); incidentMgn. addQuery (change_request', current.sys_id);

incidentMgn.query;

while (incidentMgn.next)(

incidentMgn.u_request_manager=changeManager;

incidentMgn. update();

}

 

Mark it as helpful and solution proposed if it serves your purpose.
Thanks,
Anand

 

Hello Anand,

 

My apologies the Parent Table is change request and the child table is Incident Table.

Will this script be good for it?

Yes I tried in my pdi working as expected.