I have a Visualforce Email template which is as below:

<messaging:emailTemplate subject="Pricing tool ticketing requested 
recipientType="User" relatedToType="pkg__Approvals__c">
<messaging:htmlEmailBody >
  <h4>{!relatedTo.S_TicketingTool__r.P_GateType__c} has been requested for Pricing
      - {!relatedTo.S_TicketingTool__r.S_Price__r.Name}.<br/>. 
  Please review and approve the request here:  <br/>
  <apex:outputLink value="{!relatedTo.S_TicketingTool__r.Id}" id="theLink">

I am expecting the Link with apex:outputLink, However, it generates the email as below:

12345 - Pricing details.

Please review and approve the request here:
[a513O000000U89UQA0]12345 - Pricing details - 05.01.2023

Any help to get the Link would be highly appreciated. On a side note, this was working fine a few days before in my sandbox and was tested. It is not working only since very recently.

1 Answer 1


<apex:outputLink> value= has to render to a valid https:// address to the SFDC record defined by:


(which by the way, is the same as {!relatedTo.S_TicketingTool__c}

Since this is an email template, you can't use relative addresses as the user will be clicking on it outside of SFDC (from within their email client)

So, the value= attribute needs to be (see this answer):


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .