+ Start a Discussion

trying to use a VF email template with Contacts

I'm trying to use a VF email template in conjuction with a button on the Contact detail page to launch an email template prepopulated with various Contact fields. I've already done this successfully with Opportunities but I can't get it to work with Contacts.


I'm getting the error:

The value of the "p3_lkid" parameter contains a character that is not allowed or the value exceeds the maximum allowed length. Remove the character from the parameter value or reduce the value length and resubmit. If the error still persists, report it to our Customer Support team. Provide the URL of the page you were requesting as well as any other related information. 


The parameters I'm passing are:


I've tried rtype=003 as well since thats what most people use. Though the only difference is hiding or showing the related to field I believe. Apparently, it won't accept  contact ID in the p3_lkid parameter. It doesn't seem to have an issue getting an Opportunity ID.


Has anyone else encountered this? Is there any other way I can get the contact object in there in a way I can reference it? I've been able to reference it when I put it in the To: field using p2_lkid, but I don't want to actually send it to the Contact.



I use p2_lkid  for the contactid to populate the contact in the email "TO".  I use p3_lkid  for the record id as below:


Hyperlink("/_ui/core/email/author/EmailAuthor?&p3_lkid="&Id&"&p2_lkid= "& ContactId &"&template_id=00X60000001eOL2&retURL=%2F"&Id&"","Email Case")