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

Announcements

No record found.

News and Announcements icon
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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
11manish Profile Picture

11manish 166

#2
ManoVerse Profile Picture

ManoVerse 149 Super User 2026 Season 1

#3
Zhilan Profile Picture

Zhilan 55

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans