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 :
Microsoft Dynamics 365 | Integration, Dataverse...
Suggested Answer

Switch Business Process via workflow (v9)

(0) ShareShare
ReportReport
Posted on by 10

Hello,

I'm trying to set up a user journey whereby a record that is used in the last stage of a business process flow (Call it BPF 1) can be switched over to a new process flow (BPF 2) upon finishing the first flow, and ideally achieving this via a workflow.

Prior to v9 this could be achieved by calling the SetProcess action on the workflow, however this is now marked as depreciated. With the new structure to the business process flows where you can create a record for the new business process flow (which I understand is the replacement for SetProcess), I can create the new instance of the BPF and set the active stage, but because the entity in question was previously under BPF1, even though BPF2 gets created the entity record doesn't actually get switched to that flow automatically. The automatic switching over to the new flow still happens if you do use the SetProcess action, but with this being marked for being deprecated, does anyone know what the alternative is supposed to be in v9?

Thanks
Oliver

I have the same question (0)
  • Wahaj Rashid Profile Picture
    11,321 on at

    Hi,

    Thank you for your query.

    Yes, you have to create a Business Process flow entity record.

    Are you setting the related record lookup in the BPF entity record? For example:

    pastedimage1612158441610v1.png

    Also, please look at the following:

    https://community.dynamics.com/crm/b/crminthefield/posts/automate-business-process-flow-stages-using-workflows

  • OliverC Profile Picture
    10 on at

    Hi Wahaj,

    The steps you are describing are to trigger the business  process flow against the record. That side of things is all working fine but is not really the issue. The problem is that if the record is already in the middle of a previous business process flow, I'm not able to switch it to the newly assigned one to use that as the active flow.

    The flow connects to the record without any issue, and if I click 'Switch Process' on the record I can see the new flow there as an in progress one to switch to, and if i choose it then it switches over fine and everything is set up correctly. In addition if the record does not have an existing business process flow already active against it, then it is also working fine and the new flow gets auto activated as its the only one.

    The specific issue is that once the business process flow is created and linked, how do you switch it to be the active process if one is already running against the record, as this doesn't happen automatically, where as the old depreciated "SetProcess" action does exactly this.

    Kind Regards

    Oliver

  • Suggested answer
    Wahaj Rashid Profile Picture
    11,321 on at
    Hi, 
    I tried reproducing this issue and here are my findings: 
    • Business Process Flows are now concurrent, this means, now different users have different BPFs active for the same record. For example, User A sees BPF1 and User B sees BPF2 on the same record. Even when User A switches to BPF2, it is possible User C still sees BPF1 (this is expected behavior). 
    • It is mentioned in the documentation, that while creating a record if you pass PorcessId, the BPF is switched (from default), you can also skip choosing a BPF if you pass an empty GUID. However, as per my understanding, this works while creating records, and that too in On-Premise. 
    • Now to switch it in online for all users, I have gone through some similar threads and found out: 
      • Use a javascript function onLoad of the form and switch the BPF using client API. You can store the active BPF's GUID in a field and switch the BPF accordingly. 
      • Use plugin/custom code activity to set the BPF for all users, you can see this in the following thread: 
    • Or use the following tool: 
    I did not test the above solution, please try and let me know if you face any issues. 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Siv Sagar Profile Picture

Siv Sagar 93 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 76

#3
Martin Dráb Profile Picture

Martin Dráb 64 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans