Skip to main content

Notifications

Announcements

No record found.

Customer Service forum

Automatic Switching of BPFs with the new model?

Posted on by 13,726

Ok, as we all know, the SetProcess action in workflows no longer works for changing BPFs.  So I'm here to ask if anyone has resolved this issue.

Short story on my side, client has a number of processes for Case resolution, all unique to the Subject type.  There is no commonality to them, other than the Subject being required.  I've looked into merging them into one giant branching Business Process, but that looks unmaintainable after trying to map it out.

What I have done so far:

1. Set up a workflow that Creates the appropriate BPF record based on Subject.  This works great, in the sense that the BPF gets created.  However, the default BPF is still on, and is the one that's showing. (tried this both real-time and async)

2. Set up a dummy Default BPF that just asks for the Customer and the Subject in one lovely stage.

3. Autocomplete/disable dummy BPF the moment the Subject is selected.

Even with all of this, the one-step dummy BPF is the one that is selected (and shows as finished), not the real Case BPF they need to do their work.  How do we set this so the only BPF that is running/showing is the only one valid for the subject?  I want to avoid code if at all possible, as my client needs to maintain it afterward.

This seems like such a huge functionality step backwards, to me.  All these enhancements to support multiple BPFs, and no easy way to set the active BPF.

Categories:
  • Wayne Walton Profile Picture
    Wayne Walton 13,726 on at
    RE: Automatic Switching of BPFs with the new model?

    I tried the real-time workflow, but even coming back to the record, it still showed the old default BPF.  I think it's going to have to be JS.

  • Darshik Profile Picture
    Darshik 295 on at
    RE: Automatic Switching of BPFs with the new model?

    are you using background workflow? if yes, the reason why your user still see original BPF, because he/she opened the record before or after the workflow run(immediately).

    To solve this issue, you need use js to switch the process when user open the record. or fire the workflow as real time and forcefully refresh the form through JavaScript.

    Regards,

    Darshik

  • Wayne Walton Profile Picture
    Wayne Walton 13,726 on at
    RE: Automatic Switching of BPFs with the new model?

    Thanks Darshik,   I am definitely considering that as a fallback option, but I was hoping to avoid JS to help keep the system more maintainable for my customers.

  • Suggested answer
    Darshik Profile Picture
    Darshik 295 on at
    RE: Automatic Switching of BPFs with the new model?

    Hi Wayne,

    you can try with the below JavaScript to switching of the BPF.

    context.getFormContext().data.process.setActiveProcess(processid, callbackFunction);

    Regards,

    Darshik  

  • Wayne Walton Profile Picture
    Wayne Walton 13,726 on at
    RE: Automatic Switching of BPFs with the new model?

    Thanks Darshik, that helps on the BPF component side of things.

    Still wish I could get a good solution for automatic BPF switching.

  • Suggested answer
    Darshik Profile Picture
    Darshik 295 on at
    RE: Automatic Switching of BPFs with the new model?

    Hi Wayne,

    Open the Stage where you want to add the Fields or Workflow then click on Add -> Select the component which you want to add to the BPF stage (dont click on the free space area after click on the component) - > scroll the screen go to stage where you wants to add the component and click on the "+" sign

    Regards,

    Darshik

  • Wayne Walton Profile Picture
    Wayne Walton 13,726 on at
    RE: Automatic Switching of BPFs with the new model?

    Update, we are testing the viability of having one big BPF and if it can be maintained.  The issue we're now running into is when trying to add a step to the BPF, instead of being able to drag and drop it onto a stage, the BPF screen moves around wildly like we're trying to scroll it with our mouse.  This is highly undesirable, and makes actually adding items next to impossible.  

    Does anyone have any solution for that issue, or at least a workaround?

  • Wayne Walton Profile Picture
    Wayne Walton 13,726 on at
    RE: Automatic Switching of BPFs with the new model?

    Anyone with any suggestions?

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans