Skip to main content

Notifications

Announcements

No record found.

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

  • Verified answer
    Preeti Sharma Profile Picture
    2,678 on at
    RE: get step name from process flow javascript

    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 :)

  • Suggested answer
    ashlega Profile Picture
    34,477 on at
    RE: get step name from process flow javascript

    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();

    });
    
    
                          
  • Suggested answer
    Rawish Kumar Profile Picture
    13,758 on at
    RE: get step name from process flow javascript

    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

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Microsoft Dynamics CRM (Archived)

#1
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 83 Super User 2025 Season 1

#2
Community Member Profile Picture

Community Member 52

#3
dkrishna Profile Picture

dkrishna 6

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans