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

  • Nikita

    Member
    September 3, 2019 at 10:33 am

    Hi Prachi,

    When you create the Link using URLFOR() in Email Template, it creates a 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