You need to sign in to do that
Don't have an account?
narendhar
Is there anyway, We can send a email to admin from trigger in case if the trigger encounters add error method.
When ever user is trying to create duplicate contact ,I would like to send an email to Admin , . I am able to prevent the duplicate contacts using trigger , but not able to send email to Admin.
I need below two operation together.
1)User should receive the duplicate contact error.
2)Admin should receive an notofication email.
I am able to perform only one action not both , Any one has any solution for this scenario?
I need below two operation together.
1)User should receive the duplicate contact error.
2)Admin should receive an notofication email.
I am able to perform only one action not both , Any one has any solution for this scenario?
*Change the subject and body of the email to your needs. You can also use a template if you want.
reference: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_email_outbound_single.htm Let me know if it worked for you.
Wil,
Either sending email or throwing an error using trigger.addError works , together not working.
I would like to send an email , when i encounter trigger.addError method.
I tried with email logic in @future method,Also i tried placing the Trigger.AddError method, Email logic in Finally{}block. None of the options are working here.
https://developer.salesforce.com/forums/?id=906F00000008xNeIAI