Creating workflows in Microsoft Dynamics CRM 2011 can lead to more efficient performance and consistent business practice. Understanding how to effectively use the workflow process step editor is key to successfully designing and implementing any workflow. The step editor toolbar allows you to add and organize various steps to your workflow giving it action and logic. If you are just starting to explore workflows, please read my previous post entitle Creating Workflows in Microsoft Dynamics CRM 2011.
When adding a step, Dynamics CRM 2011 allows you to enter a brief description. This is not required, but highly recommended for use when reporting and monitoring. Each step can be better understood from an organization stand point.
The steps available to add are:
- Check Conditions
- Wait Conditions
- Workflow Actions
Check conditions are a means of creating guidelines for a step in your workflow. These conditions control when certain actions will take place. Criteria you specify will tell the workflow to take action and complete or ignore a step, basically managing workflow logic.
There are three options for check conditions:
- Check Condition – an if-then statement.
- Conditional Branch – an otherwise-if-then statement.
- Default Action – an otherwise statement.
The Condition branch and default action options are only available to use in steps where a check condition already exists. To configure the check conditions using the familiar advanced find interface. (Learn more about the Advanced Find feature)
Using wait conditions will allow your workflow to run off certain time specifications. For example, creating a task to follow up with an opportunity relative to the date it was created on or sending an email a certain time after a status changes. Creating a wait condition uses all the same setup as a check condition with the addition of one more feature. The Timeout feature allows the workflow to wait a designated period of time before continuing. See example below:
Once your conditions are met, the workflow process with meet those conditions and take action according to your specifications. The workflows actions can be added by clicking ‘Add Step’ and selecting one of the options listed below:
|Create Record||Update Record||Assign Record||Send E-mail|
|Start Child Workflow||Change Status||Stop Workflow||Custom workflow actions|
Create Record – this action is pretty self-explanatory, it will create a record inside Microsoft Dynamics CRM. For example, you can create a lead record, new activity, and any custom entity records you may have. After selecting the Create Record action and choose the entity, select the ‘Set Properties’ button. From here you can specify default and custom attributes for your created records.
Update Records – this action will change one or multiple records in Microsoft Dynamics CRM when your conditions are satisfied. Choose the entity, then select the fields to be changed/updated and enter their new values. Always make sure if a workflow updates a record that it isn’t setting off other unnecessary workflows or plug-ins.
Assign Record – the actions will allow you to change the ownership of a record. Use the ‘Edit Assign Step Parameters’ window by selecting ‘Set Properties’ to lookup a team or user and using the dynamic values for a more advanced assignment.
Send E-Mail – this action will send an email. You can use an existing email template already set up in Microsoft Dynamics CRM or formulate a new email. click the ‘Set Properties’ button to define attributes such as the To, From, Subject, and Body of the email.
*Note – A good tip to remember when sending emails through Microsoft Dynamics CRM 2011 is always test the email by sending it to you first. This way you are able to edit mistakes before sending to important clients or customers. Also, you aren’t allowed to insert (with a button) hyperlinks or images to body of the email, but you can cost/paste the URL of the link and/or copy/paste the Image into the message.
Start Child Workflow– this action allows you to start another workflow process. To use the child workflow you use must have the option ‘As a child workflow’ selected in that particular child workflow. Utilizing child workflows can save you time when you have a large number of workflow processes running in Microsoft Dynamics CRM. Having one workflow makes things easier for editing if you find that many different workflows run the same subset of process.
Change Status – this action can change to status and status reason of any record in Microsoft Dynamics CRM. Records the process can change include: a record created in the workflow, the record that triggered the workflow, or a related record.
Stop Workflow – this action would be used in situations where you need a workflow to stop in the middle of its process when a condition is not met. There are two options to choose from when using this action:
- Succeeded – Halts the workflow immediately with a status of succeeded
- Canceled – Halts the workflow immediately with a status of canceled
Using this feature allows you to make sure Dynamics CRM closes all your processes completely.
Custom Workflow Actions – this action allows you to access any plug-ins you may have on your Microsoft Dynamics CRM platform. These actions will appear in the step editor after they are registered with the entity used in your process.
Stages are basically groups or bundles for your workflow process steps. Select ‘Stage’ from the ‘Add Step’ menu and include a description as recommend before for each individual step in the process to stay organized. Grouping your process steps in Stages will allow your workflow to progress through without proceeding to the next group before completing the current stage.
Learn how to create these powerful business processes inside Microsoft Dynamics CRM 2011 by reading about Workflows, Dialogs, and the differences between them.