Query 'Items to Approve' in Home page #inSalesforce

The approvers can see the list of items that need to be approved in the Items to Approve list on the Salesforce Home page.

And if you want to query them at once:

SELECT Id,ProcessInstance.TargetObjectId,ProcessInstance.TargetObject.Name FROM ProcessInstanceWorkitem WHERE ActorId = '00524000001SXXX' and ProcessInstance.ProcessDefinition.TableEnumOrId IN ('Opportunity') and ProcessInstance.Status = 'Pending'

Replace Opportunity, with object as per need and replace '00524000001SXXX' with the current login user or any user whose items to approve list you want to view.


Visualhttps://www.youtube.com/watch?v=kP6nP7Fx048

Comments