Business Rule scenario based interview questions and answers –
1.When a business rule is used to set or change a field value, Does Javascript OnChange event handler triggered?
A:When you set a field value by using a business rule, any OnChange event handlers for that field will not run. This is to reduce the potential for a circular reference, which could lead to an infinite loop.
2. How to Fire a Business Rule after a field is updated using JavaScript?
A: Use fireOnChange method after you set the field value
3.If we have JavaScript and Business Rule written on the same field, then the order of execution is first JavaScript then Business Rule for which even if the values of the 2 fields were set using JavaScript were getting cleared by the Business Rule.
Limitation:
1.Business rules work only with fields. If you need to interact with other visible elements, such as tabs and sections, within the form you need use form scripts.
2.When you set a field value by using a business rule, any OnChange event handlers for that field will not run. This is to reduce the potential for a circular reference, which could lead to an infinite loop.
3.If a business rule references a field that is not present on a form, the rule will simply not run. There will be no error message.
4.Whole Number fields that use the formats for TimeZone, Duration, or Language will not appear in the rule editor for the conditions or actions, so they cannot be used with business rules.
5.You can’t add more than ten if-else conditions in a business rule.
6.When you set the value of a lookup field, the text of the primary field value that is set in the form will always match the text that is visible in the rule definition. If the text representing the primary field value of the record you are setting in the lookup changes, the value set by your rule will continue to use the text portion of the primary field value defined by the rule. To fix this, update the rule definition to use the current primary name field value.
7. Full Name column and Address column not supported with Unified Interface apps
Actions or conditions that use a composite column like the Full Name (fullname) column or an Address column aren’t supported in apps based on Unified Interface. Alternatively, you can use actions or conditions with the constituent columns. For example, for the Full Name column, you can use actions or conditions on the First Name (firstname) and Last Name (lastname) columns.
8. Business rules don’t execute for some users
Make sure that users have a security role that includes, at a minimum, user scope read privileges on the Process table. By default, the Basic User security role has this privilege.
Actions-
The following actions are possible with business rules:
Set column values
Clear column values
Set column requirement levels
Show or hide columns
Enable or disable columns
Validate data and show error messages
Create business recommendations based on business intelligence.
References-
https://learn.microsoft.com/en-us/power-apps/maker/data-platform/data-platform-create-business-rule
https://community.dynamics.com/forums/thread/details/?threadid=1018a0d4-84b5-4f13-87ef-f2c62ab8cf56


