Pass a parent field value to related record

Cirrus
Kilo Sage

Hi,

I have a related list on a project record, call it Table A.

Each record in Table A has a project record as its parent.

For each entry in Table A we need to query the parent project value, then query the project table to get the value of field x (a reference field), and populate field y on Table A with the value of field x from the project.

Any ideas how to achieve this please

1 ACCEPTED SOLUTION

So a BR should be sinple

On Table A

Before

Condition : When parent is populated OR Changed AND Parent IS NOT EMPTY

SCript

current.<field X> = current.parent.<Field X>;

 

 

-Anurag

View solution in original post

4 REPLIES 4

Anurag Tripathi
Mega Patron
Mega Patron

Hi,

Are you looking for a one time script to backfill data or ongoing? when Record is added in Table A (with parent project) then it should copy value into Field X?

-Anurag

Anurag,

I have the business rule set up to populate new records , so this would be a one off script to back populate the existing records in table A

So a BR should be sinple

On Table A

Before

Condition : When parent is populated OR Changed AND Parent IS NOT EMPTY

SCript

current.<field X> = current.parent.<Field X>;

 

 

-Anurag

Thanks Anurag. After your reply I realised we could just update an unused field to trigger the business rule rather than write a script to backfill