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
}

Comments

Popular posts from this blog

Connecting Dynamics 365 Web api using external HTML page

Get azure blob files inside Sub Directories

Interview questions on MS CRM