Using addOnStageSelected and addOnStageChange method of Xrm.Page.data.process we can add function to trigger when a Stage in selected in the form or when the stage changes.
Clicking on a different stage
Clicking on a Next Stage
We can also use movePrevious() and moveNext() to move within the Process.
Sharing a mind map for quick and easy reference of new methods added for Business Process Flow in CRM 2015
(click for full screen)
CRM 2015 now provides rule based branching support for Business Process Flow.
In CRM 2013
In CRM 2015
Using Add branch we can add conditions (rules)
Rule can govern the next stage in the business process flow.
Based on the value specified for Address 1: Country field we can change the next Stage dynamically in the Business Process Flow.
Here if Country specified is India or China we change the Stage to “Stage Asia” and specify the Address1: Street 2 field to be mandatory.
If not then next Stage is set to “Stage ROW”, which expects value for Address 1: Street 3.
Inside the form, the next Stage changes dynamically based on value specified for country field.
We can combine multiple if and else conditions, however each branch cannot be more than 5 level deep i.e. cannot add more than 5 conditions for a particular branch.
Hope it helps..