So, I'm trying to build a link to a visualforce page in an email template and the following works... almost.
The only problem is that I'm getting a non-ssl link (http:// instead of https://)
<a href='{!URLFOR('/apex/SomePage', null, [id=Some_Object__c.Id,retURL="/apex/SomeOtherPage"])}'>Go to SomePage here!</a>
This causes the obvious problem of users having to log in to salesforce every time they click this link even if they are already logged in.
Attribution to: DerekLansing
Possible Suggestion/Solution #1
As a workaround, how about
<a href='{!SUBSTITUTE(URLFOR('/apex/SomePage', null, [id=Some_Object__c.Id,retURL="/apex/SomeOtherPage"]),'http:','https:')}'>Go to SomePage here!</a>
Edit - added colons to the Substitute parameters
Attribution to: metadaddy
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/1058