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
vijaymindvijaymind 

How can we get Approval Process getWorkitemId if we have the record Id

How can we get Approval Process getWorkitemId if we have the record Id ?

Best Answer chosen by Admin (Salesforce Developers) 
Scott_VSScott_VS
SELECT (SELECT Id FROM WorkItems) FROM ProcessInstance WHERE TargetObjectId =: YOUR_RECORD_ID

 

All Answers

Scott_VSScott_VS
SELECT (SELECT Id FROM WorkItems) FROM ProcessInstance WHERE TargetObjectId =: YOUR_RECORD_ID

 

This was selected as the best answer
vijaymindvijaymind

Thank you.