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.

1 Answer 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

  • This should work in this case as a workaround. Aug 31, 2012 at 21:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.