Search This Blog

Tuesday, July 25, 2017

Business Process stage onChange event

You can’t cancel the stage change using code in a handler for this event

//Put the below code in the onload function of the form
Xrm.Page.data.process.addOnStageChange(onStageChange); 


function onStageChange(ExecutionContextObj)
{
debugger;
alert(ExecutionContextObj.getEventArgs().getDirection()) // alerts "next" or "previous"
} 
This onStageChange method gets trigger when you click next or previous button. But it is not triggered when you click the link of the stage.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.