[SalesForce] Mail Merge Button

I'm a newbie…and am looking for direction to create a mail merge button and add it to the task page. I understand how to create a button and add to the page but need some help in creating the code behind to open the mail merge template and use the existing data from the current open task. Any help would be appreciated.

Best Answer

Inspect the input fields and buttons on the emailAuthor.jsp page and experiment with the URL parameters.

From what I remember:

Fields:

p3_lkid = WhatId / Related To Id (one of hidden fields in the lookup) - required if you habeis must if the merge fields are there in template
p3 = Related to name (visible input text)

p26 - from
p24 - additional to
p5 - BCC

p6 - Subject (if you don't use an email template)
p7 - plaintext body

Buttons:

template_id - Email Template Id (to preselect the template)
new_template - if your Email Template has attachments they might not load the first time, use new_template=1 to force it

Construct an URL, use the merge fields syntax to pull data from "this" Task...

Now at the very least you know what keywords to Google for ;)

send email button from custom object

Sending email with javascript on custom button

URL Hack Button to send email

Related Topic