Loading
Sales Productivity
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Use Visualforce Classic Email Templates in Automation

          Use Visualforce Classic Email Templates in Automation

          Workflows and other automations are executed in a system context. User–level limitations don’t apply when the automations use Custom, HTML, or Text Classic email templates. A user’s visibility to fields and records to apply to Visualforce Classic email templates.

          Required Editions

          Available in: Salesforce Classic and Lightning Experience

          Available in: Essentials, Enterprise, Performance, Unlimited, and Developer Editions

          Mass email not available in: Personal, Contact Manager, and Group Editions

          The result of an automation that uses a Classic email template with merge fields differs when the template is a Visualforce Classic email template.

          In the following scenarios, assume that the org has an Admin user and a standard user.

          Scenario 1: Hidden Fields

          Imagine that the Admin has hidden a field in an entity from the standard user. Two Classic email templates—one Visualforce and one HTML—have a merge field referencing the hidden field.

          When the standard user inserts either Classic email template into the email composer, the field value isn’t substituted. As expected, the merge field evaluates to a blank.

          Now imagine a workflow rule. It’s configured to send email alerts using a Classic email template. The alert fires when certain account fields are edited. If the standard user edits a field and triggers the alert, an email is sent using the template.

          • When the workflow specifies the Visualforce Classic email template, the field value evaluates to a blank.
          • When the workflow specifies the HTML Classic email template, the field value is substituted.

          Scenario 2: Hidden Records

          Imagine that the admin has changed the org’s sharing settings. They’re set to private for records: only the record owner or the admin can access a record.

          Imagine a workflow configured to fire an email when a record owner changes. The alert uses a Classic email template that includes the record owner’s info and name.

          When the standard user modifies a record and updates the owner field, the user loses access to that record. The change also triggers the email alert Workflow.

          • When the workflow specifies the Visualforce Classic email template, the email isn’t sent and the user is redirected to an error page.

            The Visualforce template retrieves the merge field value from the database, not the cache.

          • When the workflow specifies the HTML Classic email template, the email is sent and the owner field shows the new value.

            The HTML template resolves the merge field even though the user lost access to the record.

           
          Loading
          Salesforce Help | Article