Here we will learn what is a custom workflow and its use case in Microsoft Dynamics 365 CRM. Before we start, refer the below links for understanding the out-of-the-box workflows.
- What is a workflow?
- Create a basic workflow
- Difference between real time and background workflows
- What is an on-demand workflow?
- What is a child workflow?
Understand custom workflow?
In Microsoft Dynamics Workflows, if a certain functionality is not available or executable using the out of the box features then we have option to write Custom Workflow and consume that in the out-of-the-box workflow processes. In simple words, the custom workflow is an addition of custom code within the out-of-the-box workflow.
What are some important features of custom workflow?
- A custom workflow activity allows you to add complex processing steps to your configurable workflows.
- One of the best feature of a custom workflow activity is that it can take input parameters and generate output parameters.
- Custom Workflows can be run on demand as well as after triggering an event. Workflows can be configured by power users using a point and click user interface.
- Custom workflows cannot be run independently as these are treated as a process step inside a CRM workflow or Dialog.
- In workflows there is no guarantee of controlling when and in which order each custom workflow activity runs but Plugins have the execution order to set.
When should you use custom workflows over plugins?
- Plugins are more preferred when the requirement is more focused on speed of execution, security of process , validity of data.
- Custom workflows are preferred when the requirement is more focused on flexibility and functionality re-usability.
- When we are using Plugin, we have a number of triggers available (called as Steps/Message) to trigger the plugin execution.
Scope of custom workflow or standard workflow?
Workflows can be limited to automatically execute within specific organizational scopes (i.e. Org, BU, Parent and Child BUs, or for the Owner only).