Reply
Regular Contributor
Ems
Posts: 32

Apply a default template when clicking the SendEmail button on a case

This seems like something that should be easy to do, yet I am stumped.

 

In a Case, I would like my support reps to click the Send Email button and default to a predefined template in the EmailAuthor page.

 

For example - this is what the URL looks like when I click SendEmail from a Case:

 

https://na2.salesforce.com/_ui/core/email/author/EmailAuthor?p2_lkid=0034000000Ur7I4&rtype=003&p3_lk...

 

Is there another url parameter I could pass that would choose a template to include on the next screen?

 

I really don't want to completely override the SendEmail button, becuase the rest of the functionality suits just fine - only problem is that it takes too many clicks for them to pick a template.

 

Any suggestions would be great (but please don't suggest I use solutions instead - I've already been down that road!)

 

Thanks,
Emily

Trusted Contributor
Mark Silber
Posts: 402

Re: Apply a default template when clicking the SendEmail button on a case

The parameter you need to pass is template_id=00X30000000sEVn. Just replace the Record Id with the Record Id of your template.

We just added a "Send Email" button on the Case screen, not on the Activity related list that builds the URL. Here's what it looks like for our org. The button passes a default routing address (from address) in addition to the template.

/email/author/emailauthor.jsp?p26=yourroutingaddress@yourdomain.com&p3_lkid={!Case.Id}&rtype=003&p2_lkid={!Case.ContactId}&p24=&p4=&p5={!$User.Email}&template_id=00X30000000sEVn&retURL=%2F{!Case.Id}&saveURL=%2F{!Case.Id}&cancelURL=%2F{!Case.Id}

 


 

Regular Contributor
TigerPower
Posts: 51

Re: Apply a default template when clicking the SendEmail button on a case

Hey,

how about a situation when user wants to have his/her own default HTML template to

be selected, when  pressing 'send email' button (standard activity feature)?

Is it possible to define a default template with current user information? In this case it 

isn't enough if user may 'select a template' or have a custom button to send email,

because it should be users own email template...

Any ideas, or comments? Is this total no can do job? Or is there such of thing :smileyhappy:

 

Best Regards,

TigerPower

Trusted Contributor
Mark Silber
Posts: 402

Re: Apply a default template when clicking the SendEmail button on a case

I would say it's technically feasible, but would be pretty hard to implement. You would need to figure out a way to determine what specific template each user would need to send and then dynamically build the URL. This would definitely require Visualforce or an S-Control (not recommended).

There really isn't a way to dynamically select a template from a button without passing a specific Template ID. Which brings up a good point -- the Template must be in a folder that is accessible by all users for the button override to work.