EmailTemplate

Represents a template for an email, mass email, list email, or Sales Engagement email. Supported in first-generation managed packages only.

Version 

Introduced in API version 30.0.

Supported SOAP API Calls 

create(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(), retrieve(), search()

Supported REST API Methods 

GET, HEAD, POST, Query

Fields 

ApiVersion 

  • Type: double

  • Required: No

  • Properties: Filter, Nillable, Sort

  • Introduced: API version 14.0

  • Description: The API version if this is a Visualforce email template. Every Visualforce email template has an API version specified at creation.

Description 

  • Type: string

  • Required: No

  • Properties: Filter, Nillable, Sort

  • Description: The email template description. This can be useful to describe the reason for creating the template or its intended use.

FullName 

  • Type: string

  • Required: No

  • Properties: Create, Group, Nillable

  • Introduced: API version 30.0

  • Description: The unique name used as the template identifier for API access. The fullName can contain only underscores and alphanumeric characters. It must be unique, begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores.

Query this field only if the query result contains no more than one record. Otherwise, an error is returned. If more than one record exists, use multiple queries to retrieve the records. This limit protects performance.

ManageableState 

  • Type: picklist

  • Required: No

  • Properties: Filter, Group, Nillable, Restricted picklist, Sort

  • Description: Indicates the manageable state of the specified component that is contained in a package:

  • beta

  • deleted

  • deprecated

  • deprecatedEditable

  • installed

  • installedEditable

  • released

  • unmanaged

  • Possible values:

    • beta — beta

    • deleted — deleted

    • deprecated — deprecated

    • deprecatedEditable — deprecatedEditable

    • installed — installed

    • installedEditable — installedEditable

    • released — released

    • unmanaged — unmanaged

Metadata 

  • Type: complexvalue

  • Required: No

  • Properties: Create, Nillable, Update

  • Introduced: API version 30.0

  • Description: Email template metadata.

Query this field only if the query result contains no more than one record. Otherwise, an error is returned. If more than one record exists, use multiple queries to retrieve the records. This limit protects performance.

Name 

  • Type: string

  • Required: No

  • Properties: Filter, Group, idLookup, Sort

  • Description: The email template name.

NamespacePrefix 

  • Type: string

  • Required: No

  • Properties: Filter, Group, Nillable, Sort

  • Introduced: API version 14.0

  • Description: A unique string to distinguish this template from any others. For example, if this template is being using by a flow, use the NamespacePrefix to uniquely identify the templates in multiple flow instances.

RelatedEntityType 

  • Type: picklist

  • Required: No

  • Properties: Filter, Group, Nillable, Restricted picklist, Sort

  • Introduced: API version 39.0

  • 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

  • Required: No

  • Properties: Nillable, Sort

  • Description: The email subject.

The limit is 1,000 characters for Lightning email templates and 230 characters for Classic email templates.

UiType 

  • Type: picklist

  • Required: No

  • Properties: Defaulted on create, Filter, Group, Restricted picklist, Sort

  • Introduced: API version 35.0

  • Possible values:

    • Aloha — Aloha

    • SFX — SFX

    • SFX_Sample — SFXSample

DID THIS ARTICLE SOLVE YOUR ISSUE?
Let us know so we can improve!