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
Swetha A 5Swetha A 5 

How to display event activity date and event activity datetime of lead on email template ?

Hi All,

I have a doubt regarding displaying merge fields on Email template. I want to display event activityDate and Event ActivityDateTime related to Lead object in an Email Template. I have written the merge fields like below:

Your appointment Date and Time is listed below: 
{!Event.ActivityDate} 
{!Event.ActivityDateTime}


But it is not working when sending a demo email. It is an urgent requirement. Please provide a solution for this. 

Thanks in advance.
Prabhat Kumar12Prabhat Kumar12
Hi Swetha,

Event Activity is child object of lead. 

Hence, Cross Object Email Template is not Possible in salesforce at this point in time
Vote for this Idea : https://success.salesforce.com/ideaView?id=08730000000Brk7AAC

  Only Possible way to access and Display child record details in email template of parent is to use Visualforce Email Templates

Here is an Example of how to do it using VF Email Templates : http://www.infallibletechie.com/2013/05/visualforce-email-template-with-custom.html

  Other Samples : http://wiki.developerforce.com/page/VisualForceEmailTemplates_sample

  if our suggestion(s) worked,  let us know by marking the answer as "Best Answer" right under the comment.This will help the rest of the community should they have a similar issue in the future.  Thank you!
 
Swetha A 5Swetha A 5
Thank you Prabhat. It is really helpful.