MS CRM Get Current stage name using javascript
we can get the Business process Stage name with out the stage field.
here is the example:
function GetCurrentStageName() {
var formType = Xrm.Page.ui.getFormType();
if (formType == 2 || formType == 3 || formType == 4) {
var activeStage = Xrm.Page.data.process.getActiveStage();
var stageName = activeStage.getName();
Xrm.Utility.alertDialog(stageName, onCloseCallback)
}
}
function onCloseCallback() {
//Write your callback functionality
}
here is the example:
function GetCurrentStageName() {
var formType = Xrm.Page.ui.getFormType();
if (formType == 2 || formType == 3 || formType == 4) {
var activeStage = Xrm.Page.data.process.getActiveStage();
var stageName = activeStage.getName();
Xrm.Utility.alertDialog(stageName, onCloseCallback)
}
}
function onCloseCallback() {
//Write your callback functionality
}
Comments
Post a Comment