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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

Changing BPF stage on change of option set value

(0) ShareShare
ReportReport
Posted on by 247

Hello,

I have a requirements of creating a Business Process Flow and I have a field of status reason (out of box field with some custom options in it). The requirement is to change the stage of Business Process Flow according to the change of a value of option set field. For example if I choose value as value 1 in option set then the BPF stage should switch to option1 and if option set field set to option 2 then again BPF stage set to option 2. 

If I set back to option 1 from option 2 in option set value then BPF stage switch back to option 1. Please help me if anybody having a solution on this requirement. Also let me know which method I have to follow to implement this requirement i.e. using BPF UI or using JavaScript code?

Thanks

AR 

I have the same question (0)
  • Suggested answer
    Bipin D365 Profile Picture
    28,985 Moderator on at

    Hi,

    There is now way to achieve your requirement using only Javascript.

    You can use workflow to change BPF stage based on your field value. Please see below blog which explains the steps to achieve the same.

    vishalgrade.com/.../

    Please mark my answer verified if i were helpful

  • Suggested answer
    Ran Zhang Profile Picture
    Microsoft Employee on at

    Hi AR,

    I think there is possibility to achieve this. Just register a OnSave method on the form. Call the BPF change method based on OptionSet field.

    var=formContext.getattribute(OptionSet);

    if var=xxx

    then

    In order to achieve this, you have to use the methods formContext.data.process.moveNext and formContext.data.process.movePrevious so you can move back and forth in the active BPF of the form.

       function moveBPFToNextStage(context) {

           var formContext = context.getFormContext();

           formContext.data.process.moveNext();

       }

       function moveBPFToPreviousStage(context) {

           var formContext = context.getFormContext();

           formContext.data.process.movePrevious();

       }

    Besides, you can consider using workflow as well to better meet your requirement.

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Nagaraju_Matta Profile Picture

Nagaraju_Matta 123

#2
Hamza H Profile Picture

Hamza H 112 Super User 2026 Season 1

#3
Abhilash Warrier Profile Picture

Abhilash Warrier 70 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans