Newer Version Available
Letterhead
For more information, see “Create Classic Letterheads for Email Templates” in the Salesforce online help. This type extends the Metadata metadata type and inherits its fullName field.
File Suffix and Directory Location
The file suffix for letterheads is .letter and components are stored in the letterhead directory of the corresponding package directory.
Version
Letterheads are available in API version 12.0 and later.
Fields
With the exception of logo, and horizontal and vertical alignment, all of these fields are required.
| Field Name | Field Type | Description |
|---|---|---|
| available | boolean | Required. Indicates whether this letterhead can be used (true) or not (false), for example, in an email template. |
| backgroundColor | string | Required. The background color, in hexadecimal, for example #FF6600. |
| bodyColor | string | Required. The body color in hexadecimal. |
| bottomLine | LetterheadLine (enumeration of type string) | Required. The style for the bottom line. Valid style values
include:
|
| description | string | Text description of how this letterhead differs from other letterheads. |
| fullName | string | The internal name of the letterhead, based on the name, but with white spaces and special characters escaped out for validity. |
| footer | LetterheadHeaderFooter | Required. The style for the footer. |
| header | LetterheadHeaderFooter | Required. The style for the header. |
| middleLine | LetterheadLine | Required. The style for the middle border line in your
letterhead. Valid style values include:
|
| name | string | Required. The name of the letterhead. |
| topLine | LetterheadLine | Required. The style for the top horizontal line below the header.
Valid style values include:
|
LetterheadLine
LetterheadLine represents the properties of a line.
| Field | Field Type | Description |
|---|---|---|
| color | string | Required. The color of the line in hexadecimal format. |
| height | int | Required. The height of the line. |
Declarative Metadata Sample Definition
1<?xml version="1.0" encoding="UTF-8"?>
2<Letterhead xmlns="http://soap.sforce.com/2006/04/metadata">
3 <available>true</available>
4 <backgroundColor>#CCCCCC</backgroundColor>
5 <bodyColor>#33FF33</bodyColor>
6 <bottomLine>
7 <color>#3333FF</color>
8 <height>5</height>
9 </bottomLine>
10 <description>INITIAL</description>
11 <footer>
12 <backgroundColor>#FFFFFF</backgroundColor>
13 <height>100</height>
14 <horizontalAlignment>Left</horizontalAlignment>
15 <verticalAlignment>Top</verticalAlignment>
16 </footer>
17 <header>
18 <backgroundColor>#FFFFFF</backgroundColor>
19 <height>100</height>
20 <horizontalAlignment>Left</horizontalAlignment>
21 <verticalAlignment>Top</verticalAlignment>
22 </header>
23 <middleLine>
24 <color>#AAAAFF</color>
25 <height>5</height>
26 </middleLine>
27 <name>SimpleLetterheadLabel</name>
28 <topLine>
29 <color>#FF99FF</color>
30 <height>5</height>
31 </topLine>
32</Letterhead>Wildcard Support in the Manifest File
This metadata type doesn’t support the wildcard character * (asterisk) in the package.xml manifest file. For information about using the manifest file, see Deploying and Retrieving Metadata with the Zip File.