Newer Version Available

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

PlatformAction

PlatformAction is a virtual read-only object that enables you to query for actions—such as standard and custom buttons, quick actions, and productivity actions—that should be displayed in a UI, given a user, a context, device format, and a record ID.

Supported Calls

query()

Fields

Field Details
ActionListContext
Type
string
Properties
Filter, Group, Nillable, Restricted picklist, Sort
Description
Required. The list context this action applies to. Valid values are:
  • Chatter
  • FeedElement
  • FlexiPage
  • Global
  • ListView
  • ListViewRecord
  • MruList
  • MruRow
  • Record
  • RelatedList
  • RelatedListRecord
ActionTargetType
Type
string
Properties
Filter, Group, Nillable, Restricted picklist, Sort
Description
The type of the target when this action is triggered. Valid values are:
  • Describe—applies to actions with a user interface, such as quick actions
  • Invoke—applies to actions with no user interface, such as action links or dynamic actions
ActionTargetUrl
Type
string
Properties
Filter, Group, Nillable, Sort
Description
URL to invoke or describe the action when the user invokes the action.
Category
Type
string
Properties
Filter, Group, Nillable, Restricted picklist, Sort
Description
Applies only to action links. Denotes whether the action link shows up in the feed item list of actions or the overflow list of actions. Valid values are:
  • Primary
  • Overflow
ConfirmationMessage
Type
string
Properties
Filter, Group, Nillable, Sort
Description
Applies only to action links. The message to display before the action is invoked. Field is null if no confirmation is required prior to invoking the action.
DeviceFormat
Type
string
Properties
Filter, Group, Nillable, Restricted picklist, Sort
Description
Specify what action icon is returned by the PlatformAction query. If this field isn’t specified, it defaults to Phone. Valid values are:
  • Aloha
  • Desktop
  • Phone
  • Tablet
ExternalId
Type
string
Properties
Filter, Group, Nillable, Sort
Description
The unique ID for the PlatformAction. If the action doesn’t have an ID, its API name is used.
GroupId
Type
ID
Properties
Filter, Group, Nillable, Sort
Description
The unique ID of a group of action links.
IconContentType
Type
string
Properties
Filter, Group, Nillable, Sort
Description
The content type—such as .jpg, .gif, or .png—of the icon for this action. Applies to both custom and standard icons assigned to actions.
IconHeight
Type
int
Properties
Filter, Group, Nillable, Sort
Description
The height of the icon for this action. Applies only to standard icons.
IconUrl
Type
string
Properties
Filter, Group, Nillable, Sort
Description
The URL of the icon for this action.
IconWidth
Type
int
Properties
Filter, Group, Nillable, Sort
Description
The width of the icon for this action. Applies only to standard icons.
InvocationStatus
Type
string
Properties
Filter, Group, Nillable, Restricted picklist, Sort
Description
The status of the action within the feed item. Applies to action links only. Valid values are:
  • Failed
  • New
  • Pending
  • Successful
InvokedByUserId
Type
ID
Properties
Filter, Group, Nillable, Sort
Description
The ID of the user who most recently invoked this action within the current feed item. Applies to action links only.
IsGroupDefault
Type
boolean
Properties
Filter, Group, Sort
Description
Denotes whether this is the default action in an action link group. False for other action types. Applies to action links only.
Label
Type
string
Properties
Filter, Group, Sort
Description
The label to display for this action.
PrimaryColor
Type
string
Properties
Filter, Group, Nillable, Sort
Description
The primary color of the icon for this action.
RelatedSourceEntity
Type
string
Properties
Filter, Group, Nillable, Sort
Description
When the ActionListContext is RelatedList or RelatedListRecord, this field represents the API name of the related list to which the action belongs.
SourceEntity
Type
string
Properties
Filter, Group, Sort
Description
Required. The object or record with which this action is associated.
Subtype
Type
string
Properties
Filter, Group, Nillable, Sort
Description
The subtype of the action. For quick actions, the subtype is QuickActionType. For custom buttons, the subtype is WebLinkTypeEnum. For action links, subtypes are Api, ApiAsync, Download, and Ui. Standard buttons and productivity actions have no subtype.
Type
Type
string
Properties
Filter, Group, Restricted picklist, Sort
Description
The type of the action. Valid values are:
  • ActionLink
  • CustomButton
  • ProductivityAction
  • QuickAction
  • StandardButton

Usage

PlatformAction can be described using describeSObject().

You can directly query for PlatformAction. For example, this query returns all fields for actions associated with each of the records of the listed objects:

To query PlatformAction, you must provide the ActionListContext and SourceEntity.

Note