Monday 2 November 2015

Business Process Stage Change and Stage Select Events in CRM 2015

Hi,

Sometimes we get a requirement to do some operations on the business process stage change or on the select of the stage. This can be done by the following way.

We have two new events addOnStageChange and addOnStageSelected.

Just attach a function to theses event on the load of the form.

function onLoad() {
    Xrm.Page.data.process.addOnStageChange(onStageChangeEvent);
    Xrm.Page.data.process.addOnStageSelected(onStageSelectEvent);
}

// Stage Change Event
function onStageChangeEvent(eventArgs) {
    alert("I am Stage Change Event");
}

// Stage Select Event
function onStageSelectEvent(eventArgs) {
    alert("I am Stage Select Event");
}

Here is the output.
 


Hope this helps.

--
Happy CRM'ing

Gopinath

No comments:

Post a Comment