You need to sign in to do that
Don't have an account?
Geof131313
Automatically Approving
Hello,
I have what I thought would be a simple requirement, namely to automatically approve a record if the assigned approver is a specific user. Unfortunately, the Approval object does not allow for triggers, and I can't find any sample code anywhere to go off of.
Thanks,
Geoffrey
Where are you getting the approver from?
If it is a related user, can you set the criteria in the approval process that if the field is != that value put in the process else approve record?
Otherwise, you will have to write a trigger on the object that was actually submitted for approval
Here is some code I use in a test method to approve a record
All Answers
http://boards.developerforce.com/t5/Apex-Code-Development/Creating-Auto-Approval-Process-Trigger/td-p/202194
Where are you getting the approver from?
If it is a related user, can you set the criteria in the approval process that if the field is != that value put in the process else approve record?
Otherwise, you will have to write a trigger on the object that was actually submitted for approval
Here is some code I use in a test method to approve a record