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 :
Customer experience | Sales, Customer Insights,...
Suggested Answer

Set business process flow stage dynamically using JS

(0) ShareShare
ReportReport
Posted on by 10

I am trying to set the active stage of my business process flow when my condition is false. However I am getting the "work flow with ID <> does not exist." error even when the stage ID is correct.pastedimage1629448638630v1.png

Here is my JS code 

pastedimage1629448909857v6.png

And here is the ID of the stage I would like to set active.

pastedimage1629448768262v5.png

I have the same question (0)
  • Suggested answer
    Abdul Wahab Profile Picture
    12,119 Moderator on at

    Please go through the link: https://carldesouza.com/using-javascript-to-go-to-next-stage-in-business-process-flows/. It will help you a lot.

    Let me know if I can help you more.

    Thanks

    Regards,

    Abdul Wahab

  • Suggested answer
    Rakesh90 Profile Picture
    200 on at

    Hi kthlnvrgna,

    You are using setActiveProcess which is incorrect. This method is used to set an Active BPF to the record,

    In your case you should use setActiveStage like below

    formContext.data.process.setActiveStage(stageId, callbackFunction);

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 > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 83 Super User 2025 Season 2

#2
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 49 Most Valuable Professional

#3
#ManoVerse Profile Picture

#ManoVerse 40

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans