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 :
Finance | Project Operations, Human Resources, ...
Answered

workflow step name

(0) ShareShare
ReportReport
Posted on by 131

Hello,

I need to fetch the name of the "Step" of the workflow. 

For example:

In my workflow,  step1 : approved by teamlead (name of step)

step2: approved by manager (name of step)

so, I need to show the name i.e: approved by teamleader

can anyone help with the code and relation to acheive this?

Thankyou 

AyuSri.

I have the same question (0)
  • Suggested answer
    Komi Siabi Profile Picture
    13,190 Most Valuable Professional on at

    Hello AyuSri,

    You can use this to get the step.

    Here, we try to get the current step of the workkflow during the approval process.

    public display Description currentStep()
    {
        WorkflowTrackingTable             trackingTable;
        WorkflowTrackingStatusTable       trackingStatusTable;
    
        select RecId, User,Name, CreatedDateTime from trackingTable
        order by CreatedDateTime desc where
         trackingTable.TrackingType == WorkflowTrackingType::Creation &&
         trackingTable.TrackingContext == WorkflowTrackingContext::Step
        join trackingStatusTable
        where trackingTable.WorkflowTrackingStatusTable == trackingStatusTable.RecId &&
            trackingStatusTable.ContextRecId == this.RecId &&
            trackingStatusTable.ContextTableId == this.TableId;
    
        return trackingTable.Name;
    
    }

  • Suggested answer
    Mohit Rampal Profile Picture
    12,565 Moderator on at

    Hi Aayushii, I think you are referring to 'Name' field in WorkflowTrackingTable table. If yes, then you can leverage the below code to find the workflow approval step.

    daxingwitheshant.blogspot.com/.../x-code-to-return-workflow-approver-name.html

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!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 514 Super User 2026 Season 1

#2
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 390

#3
Adis Profile Picture

Adis 266 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans