Usually in an email template we give the record detail link at the end of the content body saying something like :

Here is the link to the record – RecordLink

But what if you want the link embedded on the auto number field of record or any custom made unique id?

Something like this:

This way you will be showing the record’s unique id and the hyperlink to the record at the same time using the same text.

How to Do

HTML TEMPLATE
  1. Go to setup and search Classic Email Templates
  2. Click on ‘New Template’.
  3. Select HTML (using Classic Letterheads) and then click next.
  4. In the body of the email add your desired message and add the AutoNumber field in the body.
  5. Select the AutoNumber field and click on insert link button at the top the page.
  6. You the format – yourSalesforceLink/recordID
  7. Click Save and test your email alert.

Where ,

yourSalesforceLink is the URL that appears in the address bar. Copy and paste everything before the first /

recordId – Standard Unique Salesforce record id

For example if your Salesforce url is – xyz.my.salesforce.com

Record id is – 006xxxxxxxxx

Then your format would be -> xyz.my.salesforce.com/006xxxxxxxxx

Make sure your body looks similar to this:

CUSTOM TEMPLATE
  1. Go to setup and search Classic Email Templates
  2. Click on ‘New Template’.
  3. Select Custom (without using Classic Letterhead) and then click next.
  4. Create url in the format –

<a href= “{!Opportunity.Link}”>{!Opportunity.Opp_ID__c}</a>

The result will look like :


0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *