Using JavaScript to Go to Next Stage in Business Process Flows (Continued)

Leave a comment

In a previous post, we look at how to go to the next stage in a Business Process Flow. Let’s continue this and look at more methods in the Client API to help us achieve this, including and, which are useful if you need the BPF UI updated in real time.

If you prefer to learn by video, check out this video on my YouTube channel:

Let’s look at the BPF we have on the Account record.

If we jump into Debugger, we see there is a useful, which gives us the BPF (I’ll run it below using the old Xrm.Page.ui.process):

Let’s assign a variable to this:

var process =;

We can do a lot of things with this, such as attaching to the events when a user selects and changes stages in the flow.

The BPF at this point is unsaved, and therefore we can’t move to the next stage. Save the BPF:

This enables the Next Stage functionality:

Now let’s run process.moveNext(). This will automatically move the BPF to the next stage, without having to refresh the whole UI:

Running it again will continue to move it next:

And process.movePrevious() will move it backwards:

Note if you make a change that is unsaved, it will not move. You could run a save command in the JS before moving.



Carl de Souza is a developer and architect focusing on Microsoft Dynamics 365, Power BI, Azure, and AI.

carldesouza.comLinkedIn Twitter | YouTube


Leave a Reply

Your email address will not be published. Required fields are marked *