Newer Version Available
ActionLinks Class
Namespace
Usage
An action link is a button on a feed element. Clicking an action link can take a user to a Web page, initiate a file download, or invoke an API call to Salesforce or to an external server. An action link includes a URL and an HTTP method, and can include a request body and header information, such as an OAuth token for authentication. Use action links to integrate Salesforce and third-party services into the feed so that users can drive productivity and accelerate innovation.
There are two views of an action link and an action link group: the definition, and the context user’s view. The definition includes potentially sensitive information, such as authentication information. The context user’s view is filtered by visibility options and the values reflect the state of the context user.
Action link definition can be sensitive to a third party (for example, OAuth bearer token headers). For this reason, 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. Use these methods to operate on action link group definitions (which contain action link definitions).
- createActionLinkGroupDefinition(communityId, actionLinkGroup)
- deleteActionLinkGroupDefinition(communityId, actionLinkGroupId)
- getActionLinkGroupDefinition(communityId, actionLinkGroupId)
Use these methods to operate on a context user’s view of an action link or an action link group.
- getActionLink(communityId, actionLinkId)
- getActionLinkGroup(communityId, actionLinkGroupId)
- getActionLinkDiagnosticInfo(communityId, actionLinkId)
For information about how to use action links, see Working with Action Links.
ActionLinks Methods
createActionLinkGroupDefinition(communityId, actionLinkGroup)
API Version
33.0
Requires Chatter
No
Signature
public static ConnectApi.ActionLinkGroupDefinition createActionLinkGroupDefinition(String communityId, ConnectApi.ActionLinkGroupDefinitionInput actionLinkGroup)
Parameters
- communityId
- Type: String
- ID for an Experience Cloud site, internal, or null.
- actionLinkGroup
- Type: ConnectApi.ActionLinkGroupDefinitionInput
- A ConnectApi.ActionLinkGroupDefinitionInput object that defines the action link group.
Return Value
Usage
An action link is a button on a feed element. Clicking an action link can take a user to a Web page, initiate a file download, or invoke an API call to Salesforce or to an external server. An action link includes a URL and an HTTP method, and can include a request body and header information, such as an OAuth token for authentication. Use action links to integrate Salesforce and third-party services into the feed so that users can drive productivity and accelerate innovation.
All action links must belong to a group. Action links in a group are mutually exclusive and share some properties. Define standalone actions in their own action group.
Information in the action link group definition can be sensitive to a third party (for example, OAuth bearer token headers). For this reason, only calls made from the Apex namespace that created the action link group 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.
Example for Defining an Action Link and Posting with a Feed Element
Example for Defining an Action Link in a Template and Posting with a Feed Element
deleteActionLinkGroupDefinition(communityId, actionLinkGroupId)
API Version
33.0
Requires Chatter
No
Signature
public static void deleteActionLinkGroupDefinition(String communityId, String actionLinkGroupId)
Parameters
Return Value
Type: Void
Usage
Information in the action link group definition can be sensitive to a third party (for example, OAuth bearer token headers). For this reason, only calls made from the Apex namespace that created the action link group 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.
getActionLink(communityId, actionLinkId)
API Version
33.0
Requires Chatter
No
Signature
public static ConnectApi.PlatformAction getActionLink(String communityId, String actionLinkId)
Parameters
Return Value
getActionLinkDiagnosticInfo(communityId, actionLinkId)
API Version
33.0
Requires Chatter
No
Signature
public static ConnectApi.ActionLinkDiagnosticInfo getActionLinkDiagnosticInfo(String communityId, String actionLinkId)
Parameters
Return Value
getActionLinkGroup(communityId, actionLinkGroupId)
API Version
33.0
Requires Chatter
No
Signature
public static ConnectApi.PlatformActionGroup getActionLinkGroup(String communityId, String actionLinkGroupId)
Parameters
Return Value
Usage
All action links must belong to a group. Action links in a group are mutually exclusive and share some properties. Action link groups are accessible by clients, unlike action link group definitions.
getActionLinkGroupDefinition(communityId, actionLinkGroupId)
API Version
33.0
Requires Chatter
No
Signature
public static ConnectApi.ActionLinkGroupDefinition getActionLinkGroupDefinition(String communityId, String actionLinkGroupId)
Parameters
Return Value
Usage
Information in the action link group definition can be sensitive to a third party (for example, OAuth bearer token headers). For this reason, only calls made from the Apex namespace that created the action link group 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.