EmailTemplate

Represents a template for mass email, or email sent when the activity history related list of a record is modified.
Note
You cannot send a mass email using a Visualforce email template.

Supported Calls

create(), delete(), query(), retrieve(), update(), describeSObjects(), getDeleted(), getUpdated()

Special Access Rules

Customer Portal users cannot access this object.

Fields

Field Field Type Field Properties Description
ApiVersion double CreateFilterNillableUpdate The API version for this class. Every class has an API version specified at creation.
Body textarea Create

Nillable

Update
Content of the email.
BrandTemplateId reference Create

Filter

Nillable

Required. ID of the BrandTemplate associated with this email template. The brand template supplies letterhead information for the email template.
Description string Create

Filter

Nillable

Update
Description of the template, for example, Promotion Mass Mailing.
DeveloperName string Create

Defaulted on create

Filter

Nillable

Update

The unique name of the object in the API. This name can contain only underscores and alphanumeric characters, and must be unique in your organization. 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.
Encoding picklist Create

Filter

Nillable

Restricted picklist

Update

Character set encoding for the template.
FolderId reference Create

Filter

Update

ID of the folder that contains the template.
HtmlValue textarea Create

Nillable

Update

This field contains the content of the email message, including HTML coding to render the email message. Limit: 384 KB.
IsActive boolean Create

Defaulted on create

Filter

Update

Indicates that this template is active if true, or inactive if false.
LastUsedDate dateTime Filter

Nillable

Date and time when this EmailTemplate was last used.
Markup textarea Create

Nillable

Update

The Visualforce markup, HTML, Javascript, or any other Web-enabled code that defines the content of the template.
Name string Create

Filter

Nillable

Update

Name of the template. Label is Email Template Name.
NamespacePrefix string Filter

Nillable

The namespace prefix associated with this object. Each Developer Edition organization that creates a managed package has a unique namespace prefix. The limit is 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 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 reference Create

Filter

ID of the owner of the template.
Subject string Create

Nillable

Update

Content of the subject line.
TemplateStyle picklist Create

Filter

Restricted picklist

Style of the template, such as formalLetter or freeform.
TemplateType picklist Create

Filter

Restricted picklist

Type of template, either HTML, text, or custom templates, or those generated byVisualforce.
TimesUsed int Filter

Nillable

Number of times this template has been used.

Usage

To retrieve this object, issue a describe call on an object, which will return a query result for each activity since the object was created. You cannot use query().

© Copyright 2000-2009 salesforce.com, inc. All rights reserved.
Various trademarks held by their respective owners.