How to Automatically Next Stage on Business Process Flow

Microsoft Dynamics CRM 2015 and CRM Online supports “Next Stage” action on the CRM Form’s current selected Business Process Flow (BPF) via JavaScript: Write scripts for business process flows


Using JavaScript saves the Microsoft CRM users time from manually clicking on the “Next Stage” in order to advance to the next Stage.  It also checks if the stage advance conditions have been met before advancing.

Here is the detail reference: (client-side reference)

Here is an example JavaScript that I would call from the CRM Form’s OnSave event:

function BPFMoveNext() {
   // Check if BPF is on current form
   if (Xrm.Page.getAttribute("processid") != null){;

Note: “processid” is the BPF’s ID, we need to check for the “proccessid” otherwise it will generate an error if there is no BPF used on the CRM form.


Contact me if you are looking for Microsoft CRM design help.

Frank Lee, Microsoft CRM MVP, San Francisco
Workopia – Keeping up with the Cloud Innovations!

About Frank Lee

Microsoft Dynamics 365 CRM/xRM consultant in San Francisco, USA.  Awarded the Microsoft MVP (Dynamics 365/CRM) 12 consecutive years from 2006 to 2018. Actively involved with Microsoft Dynamics CRM implementations since Microsoft CRM v1.0 beta (2002). Super passionate about everything CRM, especially in the areas of Cloud Computing, A.I., Digital Transformation and Automation.
This entry was posted in Business Process Flow, CRM 2015, CRM On Premise, CRM Online, JavaScript, Microsoft Dynamics CRM, MS CRM, San Francisco, Software Development Kit (SDK) and tagged , , . Bookmark the permalink.

2 Responses to How to Automatically Next Stage on Business Process Flow

  1. suleimanali says:

    I tried using the script(same code) on the save event as well, for a business process flow I have running but it didn’t work. Any reason why?
    Thank you, in advance.

    • Dev says:

      This code will work only when u save ur form twice. I think Mr. Blog writer did not check that code practically.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s