- 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-16-2024 10:58 AM
It was resolved that issue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-17-2024 04:49 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-17-2024 05:13 AM
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.