5

I'd like to query all Active approval process, know what Object they control, and ultimately pull the type of Approver (related, user, queue etc..) is this possible? doesn't seem like it..

1 Answer 1

9

you can do it by means of Process.. sobjects:

  • ProcessDefinition (Represents the definition of a single approval process.)
  • ProcessInstance (Represents an instance of a single, end-to-end approval process. Use this and the node, step, and workitem process instance objects to create approval history reports.)
  • ProcessInstanceHistory (This read-only object shows all steps and pending approval requests associated with an approval process (ProcessInstance).)
  • ProcessInstanceStep (Represents one work item in an approval process (ProcessInstance).)
  • ProcessInstanceNode (Represents a step in an instance of an approval process. Compare to ProcessNode, which describes the step in a process definition. Use this object to retrieve approval history.)
  • ProcessInstanceWorkitem (Represents a user’s pending approval request.)
1
  • 1
    Okay this is great -- Especially ProcessDefinition for grabbing the target object -- but how do I query for the field that grabs the Approver: Type - relatedUserField> developer.salesforce.com/docs/atlas.en-us.api_meta.meta/… I want to check if that field has a null value and throw an error if that's the case: Sep 27, 2018 at 18:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.