function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
SimbaSimba 

Get Approval Process or Steps Name thru SOQL or API

We have a Approval Processees developed within Salesforce on Opportunity. However, since Salesforce does not provide any reporting capabilities on these Processees, we are going to populate different object to then use for reporting, on the Opp Trigger.

 

We can get most of the information from the Process related objects within Salesforce, but I do not see the name of the Steps or Process in these objects.

 

Is there a way to get the name of the Processes Steps and Processes Name, which we would to display in our reports, either by doing SOQL or by using Approval related APIs.

 

Thanks

 

Regards.

 

gregsgregs

has anyone else figured a way to get the approval step name for a given process workitem record?  in other words, if i have a workitem record and want to know what step it is for, how can i get that information since the step name only seems to be stored in the UI and not available through the api as far as i can see...

emmadiemmadi

Any one find the way to solve this issue


gregs wrote:

has anyone else figured a way to get the approval step name for a given process workitem record?  in other words, if i have a workitem record and want to know what step it is for, how can i get that information since the step name only seems to be stored in the UI and not available through the api as far as i can see...


 

shrutiiiiishrutiiiii
Anyone found a way for getting Process Step Name after process is approved?
Darshee MehtaDarshee Mehta
you can use a query of this sort: [SELECT Id, Status, CreatedDate, CompletedDate, TargetObjectId, 
                                                (SELECT Id, StepStatus, Actor.Name, ElapsedTimeInDays, ElapsedTimeInMinutes, 
                                                CreatedDate, ProcessNodeId, ProcessNode.Name, Comments 
                                                FROM StepsAndWorkitems order by CreatedDate) from ProcessInstance 
                                                Where TargetObjectId =: orderId order by CreatedDate]

ProcessNode.Name here will give the step name.
akshay khannaakshay khanna
Anyone found a way for getting Process Step Name after process is approved?
Best Washing Machine in India (https://bestwashingmachine.in)