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
Kim Lebicz 2Kim Lebicz 2 

Submit for approval on behalf of someone else.

I have setup an approval process for a custom object. When the approval is submitted it goes to a users Manager, VP and then the COO for approval. It appears that anyone can create the record but whoever actually hits the Submit for Approval button determines the Manager and VP it goes to. I was wondering if it is possible to be based on a User lookup field ("Requestor") on the custom object instead of who is clicking on the Submit for Approval button. This way we can allow someone to submit the approval on behalf of the "Requestor", for example an exec admin. 
 
vaishali sharmavaishali sharma
Hi Kim,
If you have a set of the user that you want to set to submit approval process then yes you can create a custom field and can define them in the filter criteria.But if there is no defined user then it won't be able to achieve it .as per my logic
Vivian Charlie 1208Vivian Charlie 1208

Hi Kim,

 

Unfortunately you cannot submit a record for approval on behalf on someone else using standard approval process. During an Approval Process creation you get an option

Specify Approver Field and Record Editability Properties, however all this happens based on the submitter of the record

You get only 3 options here

  1. None
    • Manually chose the approver 
    • Assign it to a User / Related User / Partner User / Portal User
  2. Manager
    • Sent for approval to the Manager
  3. Custom User lookup (Anything you specify here gets created as a custom user lookup field on User object)
    • Sent for approval to the user lookup you specified


However Salesforce allows you to submit records for approval vis apex. This gives tighter control around who can submit the record. You can review the help page at the following link which has a setSubmitterId() method which you can use

https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_process_example.htm

Thanks

Vivian

Kim Lebicz 2Kim Lebicz 2
Thank you both. I actually used Process Builder to automatically submit for approval based on a custom "Requester" field and it is working perfectly. Thank you for your feedback, it is very much appreciated.