- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2024 08:19 AM - edited 12-11-2024 09:22 AM
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.
and also it will trigger when I create New project record from 'New' UI button which is present in related list of Demand table.
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.
Thank You.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2024 09:31 AM
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);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2024 09:31 AM
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);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2024 09:55 AM
Thanks @Brad Bowman .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2024 04:51 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2024 05:46 AM
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?