Activity Forums Salesforce® Discussions How to get “https” link instead of “http” for Salesforce Visualforce Page using URLFOR() in Email Template ?

  • shariq

    Member
    September 22, 2018 at 9:40 pm

    When you create the Link using URLFOR() in Email Template, it creates link in “http” format instead of “https” and thus causes end user to logged into salesforce again.

    So instead of

    <a href='{!URLFOR('/apex/SomePage', null, [id=Some_Object__c.Id,retURL="/apex/SomeOtherPage"])}'>Go to SomePage here!</a>

    We can use something like :

    <a href='{!SUBSTITUTE(URLFOR('/apex/SomePage', null, [id=Some_Object__c.Id,retURL="/apex/SomeOtherPage"]),'http:','https:')}'>Go to SomePage here!</a>

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos