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

image

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: Xrm.Page.data.process (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){
      Xrm.Page.data.process.moveNext();
   }
}

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!

Advertisements

About Microsoft Dynamics CRM Online

Microsoft Dynamics CRM and CRM Online specialist. Microsoft CRM MVP since 2006
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.

One Response 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.

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s