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
Harshada Kadu 9Harshada Kadu 9 

Automatic setting of Email Template when an agent tries to reply client

Hello,
I am implementing Email to case.I want to set default email templates depending on case status, from email address and case owner when an agent tries to send an email.
I have written a class which implements Support.EmailTemplateSelector. I have referred to this link :-https://www.salesforce.com/blog/2012/10/case-feeds-smart-template-sample-implementation.html. But the template is not getting populated in email body.
So if anyone can help as to how to develop code that gives me functionality that I want.

Also there I have  teams of different languages.So I have different email messages in each language.But there are some values in them which should dynamically populate when agent tries to send email. I tried storing these messages in an object and using merge fields tried to retrive them in email templates.But the values are not getting fetched and when the email is sent, It appears to be blank.
What can I do to get these messages dynamically.?

Thanks & Regards,
Harshada
 
NagendraNagendra (Salesforce Developers) 
Hi Harshada,

Can you post the full class code here? 

Also, you can apply a Default Email Template Using the Send Email Quick Action, and include your select an HTML email template, then embed your logic in the HTML. See more information here:  Thanks,
Nagendra