+ Start a Discussion
Chicho13Chicho13 

Email Button - Email Template

I would like to create a custom button in the Contact detail page that when we click on it, it sends an email template capturing the information of that paricular contact.

 

How can I do this? Any code would be very much appreciate it!

 

Thanks!

Dev@Force.ax647Dev@Force.ax647

Use ajax to call your apex method and then in code send email using template

 

http://teachmesalesforce.wordpress.com/2011/05/02/call-apex-code-from-a-custom-button/

puneet28puneet28

Hi Chicho,

Its your lucky day. :D

Put this in your custom button and replace with Ids in your system.

 

/_ui/core/email/author/EmailAuthor?p2_lkid={WHO_ID}&p3_lkid={WHAT_ID}&template_id=TEMPLATE_ID&rtype=003&retURL=%2F{RECORD_ID}

 More Detail on this:

http://www.xlerate.ca/nik/?p=97