Tell me more ×
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.

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.

share|improve this question

1 Answer

up vote 7 down vote accepted

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

share|improve this answer
This should work in this case as a workaround. – DerekLansing Aug 31 '12 at 21:12

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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