Is there any way we can prevent submitter of approval process from approving the record?
2 Answers
There could be situations where submitter and approver are part of the same queue where anyone of them can approve the record.
To restrict, submitter to approve the request follow this steps:
Create two text fields to capture submitter and approver's id.
Create field update from approval processes to update those field values during submission and approval.
And, create an before update trigger on that object which will verify if approver's Id is same as submitter's id and throw the error.
Also, other than trigger, you can use validation rule which will prevent approver's Id same as submitter.
-
Thanks Santanu! How do i capture submitter and approver's id in workflow action in Knowledge Article object? Commented Jul 3, 2019 at 14:07
-
Your approval process shouldn't be designed to have an approver same as a submitter, if you have such a situation then there is no sense of having an approval process in place!
There are many ways to select an approval: Manager of Submitter Upper Hierarchy User Specific User etc
If you use the approver wisely then this shouldn't appear! Another thing is if you are logged in as an admin then it might be able to submit & approve too! Try with users with non-admin profiles!
Trailhead Link for Approval Process: https://trailhead.salesforce.com/en/content/learn/projects/build-a-discount-approval-process/create-an-approval-process
-
Thanks Harting! For one of the steps, we are allowing to choose approver manually. Also in case of queues, it is possible to have submitter and approver as same person. Can we somehow stop selecting submitter as approver by any validation rule etc.? Commented Jul 3, 2019 at 13:57