You need to sign in to do that
Don't have an account?
Jerun Jose
Mail to Opportunity owner and sales team using templates
Hi,
I have a requirement where I need to send an email to the Opportunity owner and some sales team members (defined by the team role).
Is it possible to use an email template while doing this? I was able to do something similar using a workflow email alert, but this time, I need to send the email through Apex.
Any help is appreciated.
Thanks,
Jerun Jose
Hi,
Please follow below link for details.
http://th3silverlining.com/2010/05/08/using-basic-email-templates-within-apex/
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_classes_email_outbound.htm
If it helps you, mark it as resolved.
Thanks for the reply, but all the posts seem to indicate that the TargetObjectID can only be set to one user, contact or lead.
Even if I set the targetObjectID to the opportunity owner, how do I add the sales team users to the recepient list?
You can make a query to the sales team based on opportunity id/contactid/accountid and pass the userid to targetObjectID
Mark it as resolved if it helps you.