Newer Version Available

This content describes an older version of this product. View Latest

ConnectApi.ActionLinkDefinition Class

The definition of an action link. Because information in the action link definition can be sensitive to a third party (for example, OAuth bearer token headers), only calls made from the Apex namespace that created the action link definition can read, modify, or delete the definition. In addition, the user making the call must have created the definition or have “View All Data” permission.
Property Name Type Description Available Version
actionUrl String The action link URL. For example, for a Ui action link, the URL may be a Web page. For a Download action link, the URL is a link to the file to download. Ui and Download action link URLs are provided to clients. For an Api or ApiAsync action link, the URL may be 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://. 33.0
createdDate Datetime An ISO 8601 format date string, for example, 2011-02-25T18:24:31.000Z. 33.0
excludedUserId String ID of a single user to exclude from performing the action. If you specify an excludedUserId, you can’t specify a userId. 33.0
groupDefault Boolean true if this action is the default action link in the action link group; false otherwise. There can be only one default action link per action link group. The default action link gets distinct styling in the Salesforce UI. 33.0
headers List<ConnectApi.​RequestHeader> The request headers for the Api and ApiAsync action link types. 33.0
id String The 18-character ID for the action link definition. 33.0
labelKey String Key for the set of labels to show in the user interface. A set includes labels for these states: new, pending, success, failed. For example, if you use the Approve key, you get these labels: Approve, Pending, Approved, Failed. 33.0
method ConnectApi.​HttpRequestMethod The HTTP method. One of these values:
  • HttpDelete—Returns HTTP 204 on success. Response body or output class is empty.
  • HttpGet—Returns HTTP 200 on success.
  • HttpHead—Returns HTTP 200 on success. Response body or output class is empty.
  • HttpPatch—Returns HTTP 200 on success or HTTP 204 if the response body or output class is empty.
  • HttpPost—Returns HTTP 201 on success or HTTP 204 if the response body or output class is empty. Exceptions are the batch posting resources and methods, which return HTTP 200 on success.
  • HttpPut—Return HTTP 200 on success or HTTP 204 if the response body or output class is empty.
33.0
modifiedDate Datetime An ISO 8601 format date string, for example, 2011-02-25T18:24:31.000Z. 33.0
requestBody String The request body for Api and ApiAsync action link types.

You must escape quotation mark characters in the requestBody value.

Note

33.0
requires​Confirmation Boolean true if the action results in something that should be confirmed, such as a delete; false otherwise. 33.0
templateId String The ID of the action link template from which to instantiate this action link, or null if the action link isn’t associated with a template. 33.0
type ConnectApi.​ActionLinkType Defines the type of action link. Values are:
  • Api—The action link calls a synchronous API at the action URL. Salesforce sets the status to SuccessfulStatus or FailedStatus based on the HTTP status code returned by your server.
  • ApiAsync—The action link calls an asynchronous API at the action URL. The action remains in a PendingStatus state until a a third-party makes a request to /connect/action-links/actionLinkId to set the status to SuccessfulStatus or FailedStatus when the asynchronous operation is complete.
  • Download—The action link downloads a file from the action URL.
  • Ui—The action link takes the user to a Web page at the action URL.

Invoking ApiAsync action links from an app requires a call to set the status, and there isn’t currently a way to set the status of an action link using Apex. To set the status, use Chatter REST API. See the Action Link resource in the Chatter REST API Developer's Guide for more information.

Note

33.0
userId String The ID of the user who can execute the action. If not specified or null, any user can execute the action. If you specify a userId, you can’t specify an excludedUserId. 33.0