+ Start a Discussion

Event Button the Populates a VF Email Template Using PE

I can't seem to create an Event Button that populates a VF Email Template with event details using Professional Edition.


.  Here is the button.


"/_ui/core/email/author/EmailAuthor?p2_lkid={!Event.Who}&p3_lkid=&p4=&p5=&p24=&cancelURL=/{!Event.Id }&retURL=/{!Event.Id}&template_id=00XA0000000eyxo&recipient_type_id={!Event.Who}&related_to_id={!Event.Id}"


Putting the p3_lkid={!Event.Id} produces an error "Invalid parameter" due to the EmailAuthor doesn't seem to allow Events as a valid p3_lkid.


Here is the VF Email Template.

<messaging:emailTemplate subject="Appointment Confirmation" recipientType="Contact" relatedToType="Event">

<messaging:htmlEmailBody >
<p>Dear {!recipient.Name},
This is a reminder of an appointment that is scheduled.  Details are:
Appoinment: {!relatedTo.Subject}
<apex:outputText value="Date: {0,date}">
<apex:param value="{!relatedTo.StartDateTime}"/>
<apex:outputText value="Time: {0,time,short}">
<apex:param value="{!relatedTo.StartDateTime}"/>
Company: {!relatedTo.What.Name}


The template populates fine when using the Send Test and Verify Merge Fields, but not using the button.  Any ideas?



Sorry it was a bit ambiguous- were you not able to create the button? Or you were able to create the button and the functionality didn't work as you expected.

Please do clarify? Have you checked it is not because of you using a professional edition though I think there is to limitation on creation of custom buttons in PE (professional Edition).




here you have some answers:




In this link they say to add at the end the parameter  "new_template=true"


this is my button:






The button when clicked produces this error message: "Invalid parameter value "00UA0000003GsSc" for parameter "p3_lkid".  Adding the "&new_template=true" parameter produces the same error message.  It appears the email author does not allow a p3_lkid with an event Id.  However, when using the Send Test Email and Merge Fields with this VF Email Template using a contact and event Id, it populates and sends the email correctly.  It doesn't use the email author.  So, is there a way to create a URL (to be used in a button) that can access the send email portion of the Send Test Email and Merge Fields with the relatedTo and recipient prepopulated?  Bottom line, how can a PE user create a button to on an Event to send an email to a Contact (listed on the event) using details of that event?




have you got any solution to this?

Instead of trying it through a button , I am trying that through a trigger.

But facing the same issue,

Similarly when send test through the test mail, it populates all the fields but give exception when trying it through trigger.


Thanks n Regards


Sri KrishnamurthySri Krishnamurthy
Hi, you got any solution for this, exactly into this problem now!