You need to sign in to do that
Don't have an account?
Dmitry Ofitserov
How to query "Approval History" related list
Hello,
Is there any way to query the "Approval History" related list on custom object ?
The fields I need to query are :"Actual Approver","Overall Status" and "Date".
Thanks
Is there any way to query the "Approval History" related list on custom object ?
The fields I need to query are :"Actual Approver","Overall Status" and "Date".
Thanks
http://https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_processinstanceworkitem.htm
See for more info: https://developer.salesforce.com/forums/?id=906F0000000A98bIAC
All Answers
http://https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_processinstanceworkitem.htm
See for more info: https://developer.salesforce.com/forums/?id=906F0000000A98bIAC
ProcessInstaceWorkItem represents a user's pending approval request and ProcessInstanceHistory shows all steps and pending approval requests associated with an approval process
We can not directly query ProcessInstanceHistory object. We can query using parent object i.e. through processInstance.
Example:
SELECT Id, (SELECT Id, StepStatus,Actor.Name, Comments FROM StepsAndWorkitems where StepStatus = 'Pending')
FROM ProcessInstance
Please go through the below links:
https://developer.salesforce.com/forums/?id=906F0000000A98bIAC
http://appirio.com/category/tech-blog/2014/09/display-approval-history-approval-notification/
https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_processinstanceworkitem.htm
http://salesforce.stackexchange.com/questions/89920/how-to-query-recent-approver-name-from-approval-history
https://developer.salesforce.com/forums/?id=906F0000000956gIAA
https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_processinstancehistory.htm
https://developer.salesforce.com/forums/?id=906F0000000A48KIAS
Please do let me know if it helps you.
Regards,
Mahesh
Can anyone answer my query : https://developer.salesforce.com/forums/?id=9060G0000005W54QAE
We are trying to figure out how exactly StepsAndWorkItems relate with respect to each step in the Approval process.
Thanks