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
Luke Higgins 23Luke Higgins 23 

Pass record ID into email template to append on URL

I am trying to send email to contacts through an email template and I want to append the Contact ID on a URL. I can get it to work within Salesforce but once the email is sent to an external email address, the Contact ID portion of the URL is missing.

Visualforce Email Template:
<messaging:emailTemplate subject="Test" recipientType="Contact" >
    <messaging:htmlEmailBody >
       <apex:variable var="c" value="{!recipient}" />
        <html>
            <body>
            <p>Hello,</p>

            <p><a href="www.test.com/ContactId={!recipient.Id }">Linkr</a></p>

            </body>
        </html>
    </messaging:htmlEmailBody>
</messaging:emailTemplate>

 
AbhishekAbhishek (Salesforce Developers) 
Luke try the suggestions as mentioned in the below blog,

https://trailblazers.salesforce.com/answers?id=90630000000gjpYAAQ