Skip to main content Join the Agentforce Virtual Hackathon to build innovative solutions and compete for a $50k Grand Prize. Sign up now. Terms apply.
My requirement is I need to add the hyperlink in the pdf attachment in an email.

when they click the links in the email, there should navigate to the current record id. (For example, if I click that link in the email which  I received then that should navigate to contact record page with respective contact id)

It possible guys?

 
4 answers
  1. May 4, 2021, 6:21 AM
    Hi Chikku,

    Thanks for adding more clarity to the question.

    If you are implementing a Visualforce Email Template then you have default tool available to add links to your template:

    Add email link to custom or letterhead HTML templates (https://help.salesforce.com/articleView?id=000325946&type=1&mode=1)

    If you are looking to implement via Apex then can use below line in Email body while sending email:

    URL.getSalesforceBaseUrl().toExternalForm() + '/' + contact.Id

    You can replace the

    contact.Id with the object record id which you want.

    Hope above information helps, Please mark as Best Answer so that it can help others in the future.

    Thanks.
Loading
0/9000