Change BPF stages in Dynamics 365 with no code
So far we have been trying to automate BPF auto stage movement using client side js or plugin.
But again Microsoft tried to make our life easier by introducing a new feature that supports Business Process Flows as an entity in the July 2017 Update for Dynamics 365. You can now work with each Business Process Flow as its own entity through dashboards, grids, and charts. This also means that you have the ability to interact with them through Dynamics 365 workflows
In this article, I am going to focus on how you can create a Workflow for the Business Process Flow entity record to change the Active Stage when a field on the Opportunity entity record is updated. Earlier this was only possible using client-side APIs or use of a plugin.
Scenario: We have a standard lead to opportunity BPF on opportunity. Let’s we want that when BPF is in Develop stage and “identified competitors” field is marked completed, the BPF should move to the next stage i.e. Propose stage.
Earlier we had to write client side java-script or server side plugin for achieving same requirement. But we no more need any of above two. Now we can achieve the same using oob workflow.
Below is step by step solution:-
Steps 1:- Create a workflow in processes:
Step 2:- On clicking ok workflow will look as below. Check process changes check box and click on select
Step 3:- On clicking select, as in below window
a)select record type- Opportunity Id(Opportunity) as the deciding field is on opportunity
b)Check the field on change of which we want to change stage. In our case it is identify competitor :
c) click OK
Step 4:- After clicking OK, click on add step and then click add condition and check if Identify competitors is completed as below image:-
Step 5:- Now click on add step again and select update record. In update select Lead to opportunity sales process and click on set properties and in active stage field select propose as shown below
Step 6:- Now workflow will look like below. Make sure the workflow in running in background. If you convert it into realtime, you wouldn’t find the feature shown in step 3. Means this is not supported in real time workflow.
Click activate to activate the workflow:
Once activated, we are ready to test.
Testing:- Let’s see the results:-
Step 1:- Open a lead which is in develop stage (process lead to opportunity)
Step 2:- Once marked completed, the workflow will fire in background and BPF stage will move to Propose as shown below
Hope it was helpful.