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
nduchnduch 

Send Email button: automatically choose an Email Template

Hi,
I would like to achieve the following functionality:
1. Go to Contacts tab and view a contact
2. In the Activity History section click on the 'Send Email' button
3. Required result: The system displays automatically the right template based on the user and contact's country.
At the moment, the system displays a blank email and the user has to click on 'Choose Email Template' button to manually select the right email template.

The required functionality can be also seen in this video (in the 35th second):
http://www.youtube.com/watch?v=dsjgOVpDiFU&noredirect=1

My problem is that I have no access to the Activity History buttons and code, therefore I cannot do any changes. Any advice how to progress? Many thanks!

IspitaIspita

Hi,

the activity history is not exposed for customization, but you can code the functionality you are looking to implement but then the change will be bit involved and not merely URL manipulation,

 

Hope this helps....

nduchnduch

Hi Ispita,

so if I understand you correctly, I should do the following:

 

1. Create a new button on the Contacts tab that will open a new Visualforce page that looks like the Edit Email page

2. This Visualforce page will use an Apex class that will decide which Email Template to display automatically in that Visualforce page

3.  Create a Send button on that Visualforce page that will send the email AND create a new entry in the Activity History

4. Create a test Apex class to test the new functionality

 

Is that correct?

 

Many thanks! (As you can see, I am new to force.com development)