+ Start a Discussion
shrutiiiiishrutiiiii 

How to query ProcessInstanceStep approved date/time?

Hi,

After a process step is approved, I'm sending an email to the approver. In that I need to display all approved process steps in that process instance with date/time value of when all process steps are approved. Can anyone help me into this.

Approval history related list

I can query the approval step approver and comments - 

SELECT Actor.userRole.Name, OriginalActor.Name, OriginalActor.Title, StepStatus, comments,
                 ProcessInstance.CompletedDate, ElapsedTimeInDays, ElapsedTimeInHours, ElapsedTimeInMinutes
                 FROM ProcessInstanceStep where ProcessInstance.TargetObjectId=:<targetObjId>
                 and stepStatus='Approved'

But could not get the approval date.

Thanks in advance!

Best Answer chosen by shrutiiiii
Vatsal KothariVatsal Kothari
Hi Shruti,

you can get approval date by querying on field "CreatedDate".

If this solves your problem, kindly mark it as the best answer.

Thanks,
Vatsal

All Answers

Vatsal KothariVatsal Kothari
Hi Shruti,

you can get approval date by querying on field "CreatedDate".

If this solves your problem, kindly mark it as the best answer.

Thanks,
Vatsal
This was selected as the best answer
CarbonCarbon
ProcessInstanceStep.createdDate
Braj Mohan Prasad SinhaBraj Mohan Prasad Sinha
How to get level of approval status?