function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Siana DcruzSiana Dcruz 

"Send an Email" with a pre-selected template does not allow override

I have Created an action that provides a selectedTemplate ID as a parameter in the URL.The EmailAuthor page will open with the the template, but selecting a new template does not change the rendered template.Can anyone help me with this?
KapilCKapilC
Hi Slana,

Are you using acustome button for this? Could you please explain requirment in deail?

Thanks,
Kapil
Siana DcruzSiana Dcruz

Hi KapilC,

I am using a Custom button here.In the URL am passing selectedTemplateID as a parameter. the page will open with the template but selecting a new template will not allow it to override.

KapilCKapilC
Hi Slana,

Could you please send the url. I am not clear about "Selecting a new template", are you selecting new template on page?

Thanks,
Kapil
(forcecube@gmail.com)
Siana DcruzSiana Dcruz
@KapilC, am speaking of the email templates. When I click on "Select Template" option .I get a list of email template folders.When i select one,the preselected template doesnt allow it to override
KapilCKapilC
Slana,
 As per my understanding according to your problem, after selecting the new templateid you have to relaod your page with the new template id with the url for e.g.

location.replace('/email/author/emailauthor.jsp?retURL=/{!Case.Id}&p3_lkid={!Case.Id}&rtype=003&p2_lkid={!Case.ContactId}&template_id=00X80000001imf3&p4={!Case.Support_Email_Address__c}&p5=');

Thanks,
Kapil
(forcecube@gmail.com)
Siana DcruzSiana Dcruz
KapilC,
I want the TemplateId to automatically change in the URL when i select a new one.But in my case the URL doesnt change accordingly. what changes do i need to do in my VisualForce page so that each time i select a template, the templateID in the Url changes accordingly?
KapilCKapilC
Slana,

Could you please share the URL that you are using in your button. Ping me if we can discuss on IM.

Thanks,
Kapil
(forcecube@gmail.com)
KapilCKapilC
Slana,

Please find the link below if that works for you.
select-email-template (http://cloudcatamaran.com/2014/04/select-email-template-from-custom-button/)

Thanks,
Kapil
(forcecube@gmail.com)

 
Siana DcruzSiana Dcruz
@Kapil, The Client has created a Url something like this:
​https://visual.force.com/apex/EmailAuthor?selectedTemplateType=HTML&selectedTemplateID=00XG0000001sqqH&id=a0JG000000LjDvW (edited for security reason) 
but has come up with the issue that the templateID in the URL doesnt change each time a new template is selected. Since I am new to salesforce, I am not able to sort this out.
KapilCKapilC
Hi Slana,

I made some poc in my dev account. Could you please IM or mail me so that I can share the functionallity/ credentials  with you.

Thanks,
Kapil
(forcecube@gmail.com)