One of the exciting new features of Microsoft Dynamics CRM 2013 is Business Process Flows. This feature provides many benefits including:
- A business process flow guides new and existing users throughout the stages (e.g. qualify, develop, propose, etc.) in a process (e.g. sales, service, etc.)
- A business process flow can span multiple entities
- A business process flow ensures required fields are populated before proceeding to the next step
- Note: Required fields (steps) in the business process flow are independent of the form save
- Business process flows can be defined by security role
- Multiple business process flows can be defined for one entity. The user can choose which process to use
- Note: You can automatically select the business process by following the step outlined in Scott Durow’s blog
After using this feature, I was left with a few questions.
- While configuring each step, the configuration options are limited. You can only change the field/stage label and set the requirement level. For example: If my step contains a lookup field, how can I configure the default view? If the lookup field is located in the form body, this can be accomplished very easily. It is not straight forward when the field is located in the process flow header
- Can you configure a conditionally required field/step?
- How can you display the progress of your business process in a view?
Set the Default View for a Business Process Flow Step/Field
For the following example, let’s say you want to configure the opportunity’s account field to use a custom default view named Active Customer Accounts. Configuring this on the form is easy. You simply 1) open the form editor, 2) double click on the “Account” field, and 3) select the new view.
However, this change does not affect the corresponding field/stage in the business process flow. The business process flow stage still uses the Account Lookup View.
var defaultView = Xrm.Page.getControl (“parentaccountid”) .getDefaultView();
Xrm.Page.getControl (“header_process_parentaccountid”) .setDefaultView(defaultView);
Conditionally Require a Business Process Flow Step/Field?
Xrm.Page.getControl (“header_process_parentaccountid”) .setRequiredLevel (“required”);
Using the code above, the form has unexpected behavior. The step becomes required when saving the form. Normally, a required step does not restrict the form from saving. Also, if you click the Next Step button twice, you can move the process forward without filling in the required field/step.
As a rule of thumb, you should move the business logic (e.g. conditionally required fields, conditionally visible fields, etc.) from the business process flow to the form. The business process flow should be viewed as a categorized checklist.
Add the Business Process Flow to a View
Dynamics CRM Tip of the Day #46 states only one tracking method should be utilized – either the “old” sales stage field or the new business process flow. The blog provides several valid arguments for the stance. If you opt for business process flows, you may want to add the process and current stage/step into your views. When an entity is enabled for business process flows, two fields are automatically added to entity: 1) processid and 2) stageid. When these two fields are added to a view, only the GUIDs are displayed.
Instead of selecting the processid or stageid fields, select the Process Stage (Process Stage) record type. Using the Process Stage record, you have the option of selecting the Process Stage Name field or Stage Category field.
Unfortunately, the process name (e.g. Opportunity Sales Process) cannot be displayed in the view since it is related to the Process Stage record. This is only a concern if your organization has multiple business process flows defined for the same entity. However, you can include the process in the view’s filtering criteria:
If you need troubleshooting support for Microsoft Dynamics CRM 2013, RSM offers a full range of services from implementation and optimization to development and support. Contact our professionals for more information on our services at 855.437.7202 or firstname.lastname@example.org.
By Stephen Campbell – Microsoft Dynamics CRM partner in New Jersey