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

It was resolved that issue 

Hi,

I have one more query.

If the user remove that product field from demand table, so it will not remove from related product field which is present on Project table.

How to fix above issue 

 

Thank you 

Remove the Filter Condition on the Demand Business Rule:

Product(product) is not empty

So that the script will run every time the demand is updated, or add some different Filter Conditions if you don't want it to.