Newer Version Available
PostTemplate
Represents the metadata associated with an approval post template for Approvals in Chatter. With approval post templates, you can customize the information included in approval request posts that appear in Chatter feeds. This type extends the Metadata metadata type and inherits its fullName field.
File Suffix and Directory Location
PostTemplate components have the suffix .postTemplate and are stored in the postTemplates folder.
Version
PostTemplate components are available in API version 29.0 and later.
Fields
| Field Name | Field Type | Description |
|---|---|---|
| default | boolean | Required. Specifies whether this is the default post template
for the given object. When set to true, this post template is used by approval processes that are associated with the same object and don’t specify a post template. When an object has no default post template, each of its approval processes uses the system default post template, unless the approval process specifies its own post template. |
| description | string | Optional description of the post template. |
| fields | string[] | Required. An array of up to four fields to include in approval
request posts. If you make your approval object a detail object in a master-detail relationship, the Owner field isn’t available for approval page layouts or approval post templates. |
| label | string | Required. Name of the post template. This non-unique label is different from the unique name of the post template. |
Declarative Metadata Sample Definition
The following is an example of a PostTemplate component:
1<PostTemplate xmlns="http://soap.sforce.com/2006/04/metadata">
2 <default>false</default>
3 <fields>NumberOfEmployees</fields>
4 <fields>NumberofLocations__c</fields>
5 <fields>PartnerAccount</fields>
6 <fields>LeadCustomFieldNumber__c</fields>
7 <label>My Lead Post Template</label>
8</PostTemplate>1swfobject.registerObject("clippy.codeblock-1", "9");
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17<?xml version="1.0" encoding="UTF-8"?>
18<Package xmlns="http://soap.sforce.com/2006/04/metadata">
19 <types>
20 <members>Lead.leadtemplate</members>
21 <name>PostTemplate</name>
22 </types>
23 <version>29.0</version>
24</Package>
25