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
warrenlesterwarrenlester 

Workflow and approvals

I am trying to query records in the ProcessInstanceHistory object for a particular TargetObjectId. From the documentation, this would appear to give all Approval history for a given record.
 
However, nothing is returned from the query "select Id,IsPending,ProcessInstanceId,TargetObjectId,StepStatus,OriginalActorId,ActorId,RemindersSent,Comments,IsDeleted,CreatedDate,CreatedById,SystemModstamp from ProcessInstanceHistory where TargetObjectId = '{ParentRecordID}'
 
 
Is there any way to do this using the API?
 
Warren
jf317820jf317820
currently, you are unable to query the ProcessInstanceHistory table.