web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

get step name from process flow javascript

(0) ShareShare
ReportReport
Posted on by 600

Hi

I am trying to alert active step name from a business process flow but are not able to

This is my code

function test()

{
//var stageName = Xrm.Page.stageObj.getName();
var stepName = stepObj.getName();

alert(stepName);

}

I have googled and tried different options without success.

Can anyone please help?

Thanks !!!

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Rawish Kumar Profile Picture
    13,758 on at

    Hi Martin,

    this is not how you get active process flow  and step name :

    Xrm.Page.data.process - use this to drill down to the one which is currently being used.

    hope below will help you :

    dineshcrm.wordpress.com/.../business-process-flow-javascript-approach-crm-2015

  • Suggested answer
    ashlega Profile Picture
    34,477 on at

    Hi,

      you will need to get the stage first:

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


    Then you can get steps for the stage:

    var stepsCollection = activeStage.getSteps();

    https://msdn.microsoft.com/pl-pl/library/dn817878.aspx#BKMK_Stage

    Then you can iterate through the steps.. Probably something like this:

    stepsCollection.forEach(function (stepObj, index) { 
       var stepName = stepObj.getName();

    });
    
    
                          
  • Verified answer
    Preeti Sharma Profile Picture
    2,678 on at

    Hi,

    Below is the code to get name of active stage in Business Process flow:

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

    var name=activeStage.getName();

    For more information please check below link:

    msdn.microsoft.com/.../dn817878(v=crm.7).aspx

    Hope this helps :)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
AS-17030037-0 Profile Picture

AS-17030037-0 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans