My Profile

My name is Steven Foster, a Microsoft CRM MVP, working at Intergen as the CRM Product and Marketing Manager. I have over 17 years of CRM experience delivering a multitude of CRM solutions across a number of countries. I hope you find my blog interesting!
I am also an entrepreneur reselling the HappyOrNot customer satisfaction service.

Business Scenario – I want to prevent a user creating an opportunity if the credit on hold status is set to yes of the potential customer.

I have many ways of doing this for example:

I could use a plugin

I could use some JavaScript

I could use a real-time workflow in CRM2013

The significance of using a workflow is that I now no longer need a developer to perform this development and if I want to the business rule later I can again without a developer. So how do I do this?

Create a new process via Settings -> Processes

Assign the process a name, associate to the entity the user will be creating that the validation will apply, in this case an opportunity

Set the “Run this workflow in the background” to No

Click Ok

Now specify when the workflow should fire i.e. On create, change, assign, delete, in my scenario on Create

NOTE: Not applicable to on create but is to the other options is when the workflow runs before or after the save event. For validation rules you always want to execute before the change is applied

Now all you need to create is a simple condition in my case to check the related customer to the opportunity to see if the credit status is on hold and if it is prevent the save and display a message

The key to a validation rule is Stopping the workflow as “Cancelled” this method prevents the save or action occurring on the record

You will notice a new feature of real time workflows is the ability to define the status message of the reason for cancellation or success. In here we can specify how we inform the user on what to do next and is key to a validation rule.

Now activate the workflow and test

Seeing the validation in action

So I now navigate to my account record and you can see that the credit on hold status is set to Yes.

I click on the plus icon on the Opportunity grid and get presented with the quick create form.

I complete the details and save, I get presented with my nice status message, and the user can not create an opportunity.

In summary …

Simple or complex validation rules can not be applied using workflows by non developers that enable the business to own the validation of the system. Very cool new feature and again shows you can do a lot before you need to customise!