Autopopulate Product field from demand table to Project table

Omkarbh1997
Tera Expert

Hi,
I have to auto populate product field value from 'demand' table to product field in 'Project' table.
I had configure business rule for that requirement, below are the screenshot.

Screenshot 2024-12-11 212824.pngScreenshot 2024-12-11 212905.png


and also it will trigger when I create New project record from 'New' UI button which is present in related list of Demand table.

Screenshot 2024-12-11 212153_LI.jpg

 

 

Screenshot 2024-12-11 212236_LI.jpg


 

Screenshot 2024-12-11 212337_LI.jpg

 

But when I click on 'Edit' button and select any existing record then that business rule will not trigger and the value of product field will not populate.

Screenshot 2024-12-11 212630_LI.jpg

 

Screenshot 2024-12-11 212708_LI.jpg

 

 

Screenshot 2024-12-11 212745_LI.jpg

Thank You.

1 ACCEPTED SOLUTION

Brad Bowman
Kilo Patron
Kilo Patron

Clicking the Edit button and selecting a Project, updates the Project record by populating the Demand field, but does not update the Demand record, so you will need another Business Rule that runs on the project table before insert/update when the Demand field is not empty.  The script will be easier as you can just use:

(function executeRule(current, previous /*null when async*/) {
	current.product = current.demand.product;
})(current, previous);

View solution in original post

7 REPLIES 7

Brad Bowman
Kilo Patron
Kilo Patron

Clicking the Edit button and selecting a Project, updates the Project record by populating the Demand field, but does not update the Demand record, so you will need another Business Rule that runs on the project table before insert/update when the Demand field is not empty.  The script will be easier as you can just use:

(function executeRule(current, previous /*null when async*/) {
	current.product = current.demand.product;
})(current, previous);

Thanks @Brad Bowman  .

Hi @Brad Bowman  

When I update or change the demand product field value, It will not updated in product field which is present in project table.

 

Thank you 

It looks like your first Business Rule on the Demand table should cover this test case.  Is that Business Rule still active and configured as it was in the screenshots?