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

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 )

Google photo

You are commenting using your Google 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 )

Connecting to %s