You need to sign in to do that
Don't have an account?
George Laird 29
Approval process email alert question. Need Apex?
Hello All,
I've got an interesting use case here. I've got an approval process built out on Opportunities. One of the managers wants an email anytime something is approved or rejected but only if the Oppty was created by one of the people on her team. Otherwise she doesn't want an email at all.
Any ideas on how to do this? In the approval process itself, I don't see a way to send an email alert based on a criteria. I know that I could create some formula field like a checkbox to return 'true' if the record was created by someone on her team, but I don't see a way to fire of an Approval Action based off a criteria.
So maybe a trigger then on approval? If so, what object would by trigger be on?
Thanks in advance everyone!
George
I've got an interesting use case here. I've got an approval process built out on Opportunities. One of the managers wants an email anytime something is approved or rejected but only if the Oppty was created by one of the people on her team. Otherwise she doesn't want an email at all.
Any ideas on how to do this? In the approval process itself, I don't see a way to send an email alert based on a criteria. I know that I could create some formula field like a checkbox to return 'true' if the record was created by someone on her team, but I don't see a way to fire of an Approval Action based off a criteria.
So maybe a trigger then on approval? If so, what object would by trigger be on?
Thanks in advance everyone!
George
Sobject Process Instance is internally stored as an Approval Process. Please go through the document on this particular object and you can identify all the answers.
All Answers
Yes, you are absolutely correct. In the Approval process, we do not have the option to fire the approval process based on criteria, But we can fire the Approval process from Apex, Process Builder which allows checking custom conditions.
#1: Apex:
In Apex, we can fire the Approval process after checking specific requirements/conditions. Please go through this link (https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_process_example.htm)
#2: Process Builder
Process Builder is much like a trigger (configurable) which gives us an option to
For details go through this link (https://developer.salesforce.com/forums/?id=906F0000000kKJjIAM)
Hope this answered your question.
For in-depth details you can directly contact me on skype: gaurav62990 or via email: gauravgarg.nmims@gmail.com
Thanks,
Gaurav Garg
Sobject Process Instance is internally stored as an Approval Process. Please go through the document on this particular object and you can identify all the answers.