Salesforce Create Buttons and Links option - Custom URL to launch email template

Phill Pafford picture Phill Pafford · Dec 23, 2009 · Viewed 12.1k times · Source

I have an email template that I would like to launch from within the case using a Link/Button. I see the option under setup->customize->cases->button and links I even see where I need to place the URL. What I don't see is nay documentation on how to build the URL to launch an email template. Any help you be great

Answer

abeyer picture abeyer · Dec 30, 2009

I don't know if this is documented anywhere by salesforce, but I found from some guess work:

/_ui/core/email/author/EmailAuthor?p3_lkid={!Case.Id}&p2_lkid={!Case.ContactId}&template_id=00X40000000weWn

Just use that as the url content of a custom button or link. This one is for cases, as you are trying to do, but I think this should work for other types of objects as well.

The parameters are p3_lkid, which is the case id, p2_lkid which is the id of the contact you are emailing, and template_id which is hardcoded to the desired email template. (You can find this id by looking in the url of the Setup page for the template)