How to change BPF stages automatically using workflow in Dynamics 365

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:

7.PNG

Step 2:- On clicking ok workflow will look as below. Check process changes check box and click on select

2

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

1

Step 4:- After clicking OK, click on add step and then click add condition and check if Identify competitors is completed as below image:-

3

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

4

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:

8.PNG

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)

5.PNG

Step 2:- Once marked completed, the workflow will fire in background and BPF stage will move to Propose  as shown below

6.PNG

Hope it was helpful.

Cheers..!!

14 thoughts on “How to change BPF stages automatically using workflow in Dynamics 365

Add yours

  1. Thanks for this information.
    Firstly, can I lock the BPF stages so that a user doesn’t interact with it or make changes on the BPF fields?
    Secondly, What if I want the BPF stage to update automatically based on a field that is not the BPF stages.
    For example, for the sake of my question, I want the stage to change automatically when a FullName is entered.

    Like

  2. Hey Jide,
    Below is the answer of both of your questions:
    1. You can’t lock bpf stages but you can lock fields on bpf using javascrip
    eg:
    function lockField() {
    if (Xrm.Page.getControl(“header_process_YOUR_FIELD”) != null) {
    Xrm.Page.getControl(“header_process_YOUR_FIELD”).setDisabled(true);

    };
    }
    2. if you have seen screenshot in step 3 in above post, you’ll find that all fields are available to check
    of opportunity on which workflow can run, not the ones present on BPF. So if you want to change stage when full name is entered, that’s pretty simple, check name field and in conditions check whether it contains data.

    Hope it’s clear.

    Like

  3. Hi Vishal,

    Thanks for the post. It is very useful.

    Is it in anyway possible, to update the BPF in real-time? Or is that out of the questions as the BPF is a individual entity?

    Like

    1. i’m glad it was useful. Coming to your question, it’s not possible to update BPF in real-time using this workflow as you can’t run this workflow in real time on this event. I have already written in the post “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.”

      Like

  4. So I have followed all steps, and the workflow works when I manually kick it off (I made it available on demand as well). When I try to have it automatically fire when field value changes, it never starts. The only thing I can think of is that the opportunity field change I want to kick it off is a rollup field…is that a known restriction? If so, maybe I could create another hidden field where a business rule updates it to be a whole number that is always equal to whatever is the new rollup field value. Do you foresee any problems with that method? Thanks!

    Like

  5. Hi, the process is very interesting, but I can do the same for the incident entity, as I do to control the phase change, or if I have to skip a stage.

    Like

  6. Can confirm this works

    Worth noting you will need to refresh the page to see this work, would be great to see this work in real time

    Like

Leave a comment

Blog at WordPress.com.

Up ↑