0

How can I get user id of ProcessInstance object, user who submit object for approval in approval process?

  • During which step? – caleb.breckon Dec 6 '16 at 17:32
  • I need show table of approveId, object id for approve and user who submit for approve. I use: List<ProcessInstanceWorkItem> processInstanceWorkItems = [SELECT OriginalActorId, ProcessInstance.TargetObjectId, ProcessInstance.ProcessDefinitionId FROM ProcessInstanceWorkItem WHERE ProcessInstance.Status = 'Pending']; Where ProcessDefinitionId is id of approve, TargetObjectId is id of object ofr approve. But I dont know how find user who submit this object for approve – JKasyan Dec 6 '16 at 17:35
1

It's just the createdbyid field since the person submitting for approval is kicking off the approval process and creating the record.

| improve this answer | |
  • One user can create record and second, who has access, can submit for approval. – JKasyan Dec 6 '16 at 17:46
  • But the createdbyid field on ProcessInstanceWorkItem will always be who submitted for approval. – caleb.breckon Dec 6 '16 at 17:59
  • I didnt think about it. You realy help me. Thank you. – JKasyan Dec 6 '16 at 18:07

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.