In Dynamics CRM 2015, we have a way to show/hide and expand/collapse business process area:
Under Xrm.Page.ui.process methods
Use this method to expand or collapse the business process control.
Javascript:
Xrm.Page.data.process.setDisplayState(strExpanded); |
Parameter
Type:String
Remarks: “expanded” to expand the control, “collapsed” to collapse it.
Use this method to show or hide the business process control.
Javascript:
Xrm.Page.data.process.setVisible(boolVisible); |
Parameter
Type:Boolean
Remarks:true to show the control; otherwise, false.
Sometimes there is need to have scripts to do some stuff on the form when stage is changed. In Dynamics CRM 2015, following has been included:
There are two events for user interaction with the business process flow control.
OnStageChange
Occurs when a stage changes. More information: OnStageChange event.
OnStageSelected
Occurs when a stage is selected. More information: OnStageSelected event.
Note: There is no UI to register scripts for these events.
It needs to be registered in the form OnLoad event to register your functions for
these events.
· Xrm.Page.data.process.addOnStageChange
Javascript: Xrm.Page.data.process.addOnStageChange(handler);
Below methods follow the same structure:
· Xrm.Page.data.process.addOnStageSelected
· Xrm.Page.data.process.removeOnStageChange
· Xrm.Page.data.process.removeOnStageSelected
Source: CRM 2015 SDK Preview
Ask your Query : Click here
Hope it helps!
Very good documentation here, keep it on, Deepesh.