web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Blogs / Day to Day Dynamics 365 / Dynamics 365 Project Servic...

Dynamics 365 Project Service Automation: How to switch to a different Business Process Flow on the Project entity

apa Profile Picture apa 8,284 Moderator

Edited on:
February 5th 2018

Tested on:
Dynamics 365 version 8.2 and 9.0


Out of the box Dynamics 365 allows you to switch between Business Processes Flows on several of the default entities. The Project entity is a little bit different and the only visible option is abandoning the current process. While it is possible to edit the ribbon with a tool like the Ribbon Workbench, an alternative option is to create a simple workflow that changes the process.

Abandon_2D00_Process.jpg

Getting started I decided to create a Two Options field on my Project form to easily fire off the workflow that changes the Business Process Flow. If you have multiple different processes you could use an Option Set instead of a Two Options field. The idea in my example is to fire off the workflow when Yes is chosen on the Switch Process field.


Fields.jpg


The workflow I initially created in 9.0 was a background workflow as that's how I have it in a production environment in 8.2. For some reason the background workflow refused to change the process so I changed the workflow to run in real-time and the process then changed nicely. So at least in the current version of 9.0.0.2072 the workflow needs to be synchronous.

When setting the details of the workflow, remember to make the workflow run when your custom field changes. Create an if condition for the field you created followed by an Action SetProcess. The Entity dropdown will default to None (global). Don't be alarmed by this as this is normal behavior. Under Set Properties you will define the additional properties.

Workflow.png
There are two values that need to be defined under Set Process:

  1. NewProcess will define the Business Process Flow you want to use.
  2. Target will define the entity the Business Process Flow will run under.

Input-Properties.png

Where you're done setting and activating the workflow the Business Process Flow will change when you change the value on your custom field. I hope this small tip allows you to take more out of the Business Process Flows.

Remember that switching a BPF by using Switch Process doesn't change it for other users.

"If you change the BPF running in the record to another one via the switch process, it is now local to your view and does not change the BPF instance displayed to other users." Microsoft 2017.


Disclaimer: 
All my blog posts reflect my personal opinions and findings unless otherwise stated.

Comments

*This post is locked for comments

  • apa Profile Picture apa 8,284 Moderator
    Posted at

    I tried this again in a new environment and with an Option Set. It seems to work fine. I suggest you double check and try the following:

    - Is the workflow real time or background? I was able to get this to work with a background workflow.

    - The from needs to be refreshed after you choose the desired option in the option set and save the changes.

    - Check that the scope of your workflow is correct and that it fires on field change.

    If you'd like, I can send you some images of the workflow etc. in a private message as they can't be attached in comments. Add me as a friend or change your private messaging policy to accept messages from "everyone" so that I can send them.

  • bernie thibeault Profile Picture bernie thibeault 115
    Posted at

    I followed these steps with an Option Set, and I can't get the workflow to switch project processes in the background or manually. The workflow jobs say "succeeded" when doing it either way but it does not update the process.

    Any suggestions outside customizing with Ribbon Workbench? I'm on v9.0.

    Why would they not want you to be able to switch project processes in an OOTB way?