Hi,All
which one does Microsoft Prefres Javascript or Business Rule?
*This post is locked for comments
Hi
Business Rule allows you create form logic without writing javascript but it can only do the following
it has the following limitations,
1. Any field utilized in the Business Rule must be on the form in order for the Business Rule to run2. You can only have up to 10 Else If Statements3. You cannot interact with Tabs or Sections4. OnChange events are not triggered when Business Rules set a field value5. Whole number fields with TimeZone, Duration, or Language format are not supported6. Rule definitions are cached in the mobile app
ledgeviewpartners.com/.../
If your requirement can be achieved using Business Rule, you can use business rule otherwise you have to use JavaScript. When you create Business Rule, behind the scene CRM generates the java script for you. You dont get to see the java script.
And from my experience, if you have business rule with really large number of steps, doing that in JavaScript is better as you can easily change them.
https://docs.microsoft.com/en-us/dynamics365/customer-engagement/customize/create-business-rules-recommendations-apply-logic-form
Microsoft's recommendation is, if your logic fits within the capabilities of Business Rule, stick with Business Rule as it can be changed by anyone, you do not need a JavaScript developer. But if your logic is complicated and goes beyond the capabilities of Business Rule, then JavaScript is the only option.
so it means Microsoft recomends both right
Yes that's correct
Hi Sandeep ,
MS introduce business rules as a replacement of JavaScript for few functionality (already shared above ), so that non developer can implement logic without writing code . You can always go for JavaScript instead of business rules when certain limitation comes in your business rules. You have the client object model to access all form control , so you can always go for javascript but always to use OOB one like business rules, calculated field , roll-up fields wherever you need as a replacement of JavaScript , which should be your first choice.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Community Member 2
HR-09070029-0 2
UllrSki 2