ApiVersion
|
- Type
- double
- Properties
- Create, Filter, Nillable, Sort, Update
- Description
- The API version for this class. Every class has an API version specified at
creation.
|
Body
|
- Type
- textarea
- Properties
- Create, Nillable, Update
- Description
- Content of the email. Limit: 384 KB.
|
BrandTemplateId
|
- Type
- reference
- Properties
- Create, Filter, Group,
Nillable, Sort
- Description
- Required. ID of the BrandTemplate associated with this email template. The brand template supplies letterhead
information for the email template.
|
Description
|
- Type
- string
- Properties
- Create, Filter, Nillable, Sort, Update
- Description
- Description of the template, for example, Promotion Mass Mailing.
|
DeveloperName
|
- Type
- string
- Properties
- Create, Defaulted on create, Filter, Group,
Sort,
Update
- Description
- The unique name of the object in the API. This name can contain only underscores and alphanumeric
characters, and must be unique in your org. It must begin with a letter, not include
spaces, not end with an underscore, and not contain two consecutive underscores. In managed
packages, this field prevents naming conflicts on package installations. With this
field, a developer can change the object’s name in a managed package and the
changes are reflected in a subscriber’s organization.
Label is Template Unique Name.

Note
When
creating large sets of data, always specify a unique DeveloperName
for each record. If no DeveloperName is specified, performance may
slow while Salesforce generates one for each record.
|
Encoding
|
- Type
- picklist
- Properties
- Create, Filter, Group,
Nillable, Restricted picklist, Sort, Update
- Description
- Character set encoding for the template.
|
EntityType |
- Type
- picklist
- Properties
- Create, Filter, Group,
Restricted picklist, Sort,
- Description
- When UIType is 2 (Lightning Experience) or
3 (Lightning ExperienceSample),
EntityType indicates which entities this template can be used with
(for example, an account, lead, and so on). Valid values are standard object ID prefixes:
001 for account, 003 for contact, 006 for opportunity, and 00Q for lead, 500 for case,
and 701 for campaign.
- This field has been deprecated in API version 39.0. Use
RelatedEntityType instead.
|
FolderId
|
- Type
- reference
- Properties
- Create, Filter, Group,
Sort,
Update
- Description
- ID of the folder that contains the template.
|
HtmlValue
|
- Type
- textarea
- Properties
- Create, Nillable, Update
- Description
- This field contains the content of the email message, including HTML coding to render
the email message. Limit: 384 KB.
|
IsActive
|
- Type
- boolean
- Properties
- Create, Defaulted on create, Filter, Group,
Sort,
Update
- Description
- Indicates that this template is active if true,
or inactive if false.
|
LastUsedDate |
- Type
- dateTime
- Properties
- Filter, Nillable, Sort
- Description
- Date and time when this EmailTemplate was last used.
|
Markup |
- Type
- textarea
- Properties
- Create, Nillable, Update
- Description
- The Visualforce markup, HTML,
Javascript, or any other Web-enabled code that defines the content of the template.
|
Name
|
- Type
- string
- Properties
- Create, Filter, Group,
Sort,
Update
- Description
- Name of the template. Label is Email Template Name.
|
NamespacePrefix |
- Type
- string
- Properties
- Filter, Group,
Nillable, Sort
- Description
- The namespace prefix associated
with this object. Each Developer Edition organization that
creates a managed package has a unique namespace prefix. Limit:
15 characters. You can refer to a component in a managed package
by using the namespacePrefix__componentName
notation.
The
namespace prefix can have one of the following
values:
- In Developer Edition organizations, the namespace prefix is
set to the namespace prefix of the organization for all
objects that support it. There is an exception if an object
is in an installed managed package. In that case, the object
has the namespace prefix of the installed managed package.
This field’s value is the namespace prefix of the Developer
Edition organization of the package developer.
- In organizations that are not Developer Edition
organizations, NamespacePrefix is only
set for objects that are part of an installed managed
package. There is no namespace prefix for all other
objects.
This field cannot be accessed unless the logged-in user has the “Customize
Application” permission.
|
OwnerId
|
- Type
- reference
- Properties
- Create, Defaulted on create, Filter, Group,
Sort,
Update
- Description
- ID of the owner of the template.
|
RelatedEntityType |
- Type
- picklist
- Properties
- Create, Filter, Group,
Restricted picklist, Sort,
- Description
-
When UIType is
2 (Lightning Experience) or
3 (Lightning ExperienceSample),
RelatedEntityType indicates which entities this template can be
used with. Valid values are the entity API name: "Account" for account, "Contact"
for contact, "Opportunity" for opportunity, "Lead" for lead, and so on. The value can be
any entity the user has read access to (including custom entities) but not virtual
entities, setup entities, or platform entities.
- No restrictions exist at the schema level.
|
Subject
|
- Type
- string
- Properties
- Create, Group,
Nillable, Sort, Update
- Description
- Content of the subject line.
|
TemplateStyle
|
- Type
- picklist
- Properties
- Create, Filter, Group,
Restricted picklist, Sort
- Description
- Style of the template, such as formalLetter or freeform.
|
TemplateType
|
- Type
- picklist
- Properties
- Create, Filter, Group,
Restricted picklist, Sort
- Description
- Type of template, either HTML, text, or custom templates, or those templates generated
by Visualforce.
|
TimesUsed
|
- Type
- int
- Properties
- Filter, Group,
Nillable, Sort
- Description
- Number of times this template has been used.
|
UIType |
- Type
- picklist
- Properties
- Create, Filter, Group, ,
Restricted picklist, Sort,
- Description
- Indicates the user interface where this template is usable. Valid values are:
1 (Salesforce Classic), 2 (Lightning Experience), and
3 (Lightning Experience Sample).
|