› Dynamics 365, Enterprise › Using Real time workflows for Business Validations in Dynamics CRM

Using Real time workflows for Business Validations in Dynamics CRM

 Somesh Siripuram   Leave a comment

Introduction:

Like asynchronous workflows, real-time workflows can be used to model and automate real world business processes.

Real-time workflows are for business users, for example business analysts, to implement similar functionality to synchronous plug-ins without requiring .NET Framework programming experience.

How to use Real time Workflows for Custom Business Validations:

Real time workflows can be used to not only implement business logic in Dynamics, but also simple and complex validations in the business flow.

Let us understand this using 2 examples:

Example 1:
We have a business Validation that leads with employee size less than 100 should not be allowed to qualify. Earlier, we used to do this either from JS form scripting or using Plugin. But we can also use Real time workflow to achieve this, and it can throw a validation message as well to user.

1. For it to throw a validation message, we need to stop the workflow and select reason as cancelled. Then we can set the status reason as the message we want to display the user.

2. This is what the User will see if he/ she tries to qualify a lead with employee size less than 100.

3. This is the workflow that we configured:

4. You can specify the validation message in the Stop Workflow properties. Please note that Status of “Stop Workflow” should be cancelled for users to see the message.

Example 2:

We can have more complex validations as well using Real time workflow.

1. For example, Lets say we don’t want the opportunity to be Won unless the Account (Customer) has Credit limit greater than the Opportunity Budget Amount. We can configure this condition as well in Workflow.

Refer Screenshot below:

2. And the End user will see the error message as below when he/ she tries to mark the opportunity as Won when the customer’s credit limit is less than the Opportunity Budget.

Conclusion:

Real time workflows are very powerful, and can be leveraged to perform server side validations in Dynamics CRM, along with real time CRUD operations and Email messages.
 


Liked it? Share it.

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload the CAPTCHA.