Featured Post

Dynamics 365 - Business Process Flow and Things to take note before you upgrade into Dynamics 365.

In 2 months ago, my company decided to upgrade the Dynamics CRM 2016 into Dynamics 365 and there is something different about Dynamics 365 B...

Showing posts with label Dynamics CRM 2013 - Business Rule. Show all posts
Showing posts with label Dynamics CRM 2013 - Business Rule. Show all posts

Thursday, January 15, 2015

Dynamics CRM 2013 - Business Rule Vs Javascript CRM 2013

Business Rule, a feature that introduced in CRM 2013. Business Rule allows the system administrator to configure the business logic much more easier than using JavaScript without coding skill required.

But have you ever wonder what if both features are performing the same thing during onLoad or onChange event at the same time. So, we are going to configure the business rule and JavaScript to perform the same functionality and analyse the result. 

First Scenario OnLoad Event

At first i will create a business rule 


then i created a JavaScript to do the same thing that business rule does.















Result for OnLoad , seems that business rule is won.

Now i am going to test the OnChange Event. 

As expected business rule won again.
Now i will set the business rule to set the value instead of showing error message. Let's see the result.

Conclusion, business rule and JavaScript cannot work well on the same thing. If you ever encounter the problem where JavaScript is not working without error, please double check whether is there any business rule perform the same functionality that JavaScript does.

But is business rule can totally replace the JavaScript? The answer is No. Let's break into details so that you have more understand the limitation between business rule and JavaScript.