Newer Version Available
ActionLinkGroupTemplate
This type extends the Metadata metadata type and inherits its fullName field.
File Suffix and Directory Location
ActionLinkGroupTemplate components have the suffix .actionLinkGroupTemplate and are stored in the actionLinkGroupTemplates folder.
Version
ActionLinkGroupTemplate components are available in API version 33.0 and later.
Fields
| Field Name | Field Type | Description |
|---|---|---|
| actionLinkTemplates | ActionLinkTemplate[] | Action link templates that are associated with the action link group template. |
| category | PlatformActionGroupCategory (enumeration of type string) | Required. The location of the action link group within the feed element. Values are:
|
| executionsAllowed | ActionLinkExecutionsAllowed (enumeration of type string) | Required. The number of times an action link can be executed. Values are:
|
| hoursUntilExpiration | int | Required. The number of hours from when the action link group is created until it's removed from associated feed elements and can no longer be executed. The maximum value is 8,760. |
| isPublished | boolean | Required. If true, the action link group template is published. Action link group templates shouldn’t be published until at least one action link template is associated with it. |
| name | string | Required. The name of the action link group template to use in code. |
ActionLinkTemplate
ActionLinkTemplate components are used to create multiple action links that share properties.
| Field Name | Field Type | Description |
|---|---|---|
| actionUrl | string | Required. The action link URL. For example, a Ui action link URL is a Web page. A Download action link URL is a link to the file to download. Ui and Download action link URLs are provided to clients. An Api or ApiAsync action link URL is a REST resource. Api and ApiAsync action link URLs aren’t provided to clients. Links to Salesforce can be relative. All other links must be absolute and start with https://. |
| headers | string | Template for the HTTP headers sent when corresponding action links are invoked. This field can be used only for Api and ApiAsync action links. This field can contain context variables and binding variables in the form {!Bindings.key}. |
| isConfirmationRequired | boolean | Required. If true, a confirmation dialog appears before the action is executed. |
| isGroupDefault | boolean | Required. If true, action links derived from this template are the default or primary action in their action groups. There can be only one default action per action group. |
| label | string | A custom label to display on the action link button. If none of the LabelKey values make sense for an action link, use a custom label. Set the LabelKey field to None and enter a label name in the Label field. |
| labelKey | string | Required. Key for the set of labels to display for these action link states: new, pending, success, failed. For example, the Approve set contains these labels: Approve, Pending, Approved, Failed. For a complete list of keys and labels, see Action Link Labels in the Connect REST API Developer Guide. |
| linkType | ActionLinkType (enumeration of type string) | Required. The type of action link. One of these
values:
|
| method | ActionLinkHttpMethod (enumeration of type string) | Required. HTTP method for the action URL. One of these values:
Ui and Download action links must use HttpGet. |
| position | int | Required. An integer specifying the position of the action link template relative to other action links in the group. 0 is the first position. |
| requestBody | string | Template for the HTTP request body sent when corresponding action links are invoked. This field can be used only for Api and ApiAsync action links. This field can contain context variables and binding variables in the form {!Bindings.key}. |
| userAlias | string | If you selected CustomUser or CustomExcludedUser for UserVisibility, this field is the alias for the custom user. Use the alias in a template binding to specify the custom user when an action link group is created using the template. |
| userVisibility | ActionLinkUserVisibility (enumeration of type string) | Required. Who can see the action link. This value is set per action link, not
per action link group. Values are:
|
Declarative Metadata Sample Definition
The following is an example of an ActionLinkGroupTemplate component.
1<?xml version="1.0" encoding="UTF-8"?>
2<ActionLinkGroupTemplate xmlns="http://soap.sforce.com/2006/04/metadata">
3 <actionLinkTemplates>
4 <actionUrl>/services/data/{!Bindings.word}/chatter/feed-elements</actionUrl>
5 <headers>Content-Type:{!Bindings.word3}</headers>
6 <isConfirmationRequired>true</isConfirmationRequired>
7 <isGroupDefault>true</isGroupDefault>
8 <labelKey>Add</labelKey>
9 <linkType>API</linkType>
10 <method>httpPost</method>
11 <position>0</position>
12 <requestBody>{"body":{"messageSegments":[{"type": "Text",
13 "text": "{!Bindings.word1}"}]},"subjectId": "{!Bindings.word2}",
14 "feedElementType": "feedItem"}</requestBody>
15 <userAlias>customExcludedUser</userAlias>
16 <userVisibility>CustomExcludedUser</userVisibility>
17 </actionLinkTemplates>
18 <category>Primary</category>
19 <executionsAllowed>OncePerUser</executionsAllowed>
20 <hoursUntilExpiration>10</hoursUntilExpiration>
21 <isPublished>true</isPublished>
22 <name>MyPackage</name>
23</ActionLinkGroupTemplate>1<?xml version="1.0" encoding="UTF-8"?>
2<Package xmlns="http://soap.sforce.com/2006/04/metadata">
3 <types>
4 <members>*</members>
5 <name>ActionLinkGroupTemplate</name>
6 </types>
7 <version>33.0</version>
8</Package>Usage
If you modify action link group templates, you overwrite the related action link templates.
If you delete a published action link group template, you delete all related action link information which includes deleting all action links that were instantiated using the template from feed items.
Wildcard Support in the Manifest File
This metadata type supports 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.