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

Link to record does not work in visualforce email template

i am using the following code for opportunity link in visualforce email template:
Link to Opportunity: &nbsp; <apex:outputlink value="{!LEFT($Api.Partner_Server_URL_140,FIND('.com',$Api.Partner_Server_URL_140)+4)+relatedTo.Id}"><apex:outputtext value="{!LEFT($Api.Partner_Server_URL_140,FIND('.com',$Api.Partner_Server_URL_140)+4)+relatedTo.Id}"/></apex:outputlink> 
in test email it works fine but in actual email it does not displacy {!ralatedTo.Account.Name} and link is also converting to

any help is much appreciated.


I think the apex:outputText value to be corrected to {!ralatedTo.Account.Name} ( from relatedTo.Id ) 

Also, this might help,

Thank You,
Rajesh Adiga P.