I am designing a Visualforce email template for an approval process and trying to provide a link to Salesforce for the approver. I want to avoid hardcoding of the URL to avoid a post deployment step :)
<apex:outputLink value="https://cs21.salesforce.com/{!relatedto.Id}">Link</apex:outputLink>
The following tag doesn't compile and shows up
Syntax error. Missing '}'
<apex:outputLink value="{!URL.getSalesforceBaseURL().toExternalForm() + '/' +{!relatedto.Id}">Link</apex:outputLink>
The following tag compiles successfully but returns a broken link
<apex:outputLink value="!URL.getSalesforceBaseURL().toExternalForm() + '/' +{!relatedto.Id}"></apex:outputLink>
http://%21url.getsalesforcebaseurl%28%29.toexternalform%28%29+++%27/'
Please advise.