Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 82002

Business process flow using javascript?

$
0
0

I am tracking the stages of Business process flow and setting the field values,

convert this to Form context format;

function formonload() { 


Xrm.Page.data.process.addOnStageChange(getStage);  // Trigger the function when move to next stage.


getStage();
}
function getStage() {


var activeStage = Xrm.Page.data.process.getActiveStage();


var stagename = activeStage.getName();


switch (stagename) {


case "Stage1": // Stage of business process flow
Xrm.Page.getAttribute("field_1").setValue(1);
break;


case "Stage2": //Stage of business process flow
Xrm.Page.getAttribute("field_1").setValue(2);
break;
default:

}
}


Viewing all articles
Browse latest Browse all 82002

Latest Images

Trending Articles



Latest Images