Recently, we hosted a free webinar on Dynamics 365 Business Rules. During the webinar, there was one question regarding server side execution of the business rule: “Will it execute during Create request”? And I answered, "It depends. If you are setting any field which has business rule associated with it, it will fire; but if you are not using that field, the business rule will not fire".
Before jumping into action, make sure you are meeting the following requirements.
Prerequisite
So, let’s get started. Setting up Business Rule for Demo In our business rule, we are going to use account entity and we want to implement the following logic.
Let’s say, if user will select Consultant under relationship type, we will setup Consulting under Industry drop down and will setup it’s consulting SIC Code under "SIC Code" field. In our business rule, we need to use two actions if the type of customer is consultant. You can see it in the following screenshot.
Setting up console application Our business rule is ready. Now, we need to develop our console application using the following steps.
So, as we discussed above, the server side business rule will execute only when we are changing the field which has business rule associated with it. Hope it will help someone !!
Stay tuned for more Dynamics 365 content !!