JavaScript executes first and then the Business Rules ….
Recently, on change of value of a field, we had business rule earlier and then we decided to perform the same using JavaScript to avoid hard coding of value in Business rule. The logic was to set value of 2 other fields on the form based on the value selected.
The logic was working fine on DEV as we had deactivated the business rule. However, after deploying to TEST and UAT, it stopped working.
We verified that the JavaScript event handler was enabled for the OnChange event of that field.
While debugging the code as well using browser console, we checked that the break point was hitting the code block where we were setting the value of 2 other fields.
After struggling for few minutes, it came to our mind that Business rule was also written which should have been deactivated.
The business rule was basically clearing the values of…
View original post 82 more words