How to get Salesforce base url in Visualforce Email template?

Use the below method in the controller to get Salesforce base url in Visualforce Email template.

        public String getfullURL() {
        return URL.getSalesforceBaseUrl().toExternalForm();
}

fullURL variable can be used in the Visualforce Email Template.

Cheers!!!

No comments:

Post a Comment