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.
Did this article solve your issue?
Let us know so we can improve!
Loading
Salesforce Help | Article
Cookie Consent Manager
General Information
Required Cookies
Functional Cookies
Advertising Cookies
General Information
We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required Cookies
Always Active
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional Cookies
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising Cookies
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.