Newer Version Available

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

QuickActionDefinition

Represents the definition of a quick action.

This object is available in API version 32.0 and later.

Supported SOAP Calls

create(), delete(), query(), retrieve(), update()

Supported REST HTTP Methods

DELETE, GET, PATCH, POST

Fields

Field Details
Description
Type
textarea
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The description of the action.
DeveloperName
Type
string
Properties
Create, Filter, Group, Sort, Update
Description
The unique name of the action in the API. This field corresponds to the Name field in the user interface.
Height
Type
int
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The height of the action, in pixels. This field is set only when the quick action has a custom icon.
IconId
Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The ID of the action icon. This field is set only when the quick action has a custom icon.
Label
Type
string
Properties
Filter, Group, Nillable, Sort
Description
The action label that corresponds to the Label field in the user interface.
Language
Type
picklist
Properties
Create, Defaulted on create, Filter, Group, Nillable, Restricted picklist, Sort, Update
Description
The language of the action. Valid values are:
  • Chinese (Simplified): zh_CN
  • Chinese (Traditional): zh_TW
  • Danish: da
  • Dutch: nl_NL
  • English: en_US
  • Finnish: fi
  • French: fr
  • German: de
  • Italian: it
  • Japanese: ja
  • Korean: ko
  • Norwegian: no
  • Portuguese (Brazil): pt_BR
  • Russian: ru
  • Spanish: es
  • Spanish (Mexico): es_MX
  • Swedish: sv
  • Thai: th
ManageableState
Type
ManageableState enumerated list
Properties
Filter, Group, Nillable, Restricted picklist, Sort
Description
Indicates the manageable state of the specified component that is contained in a package:
  • beta
  • deleted
  • deprecated
  • installed
  • released
  • unmanaged

For more information about states of manageability for components in Force.com AppExchange packages, see “Planning the Release of Managed Packages” in the Salesforce online help.

This field is available in API version 38.0 and later.

MasterLabel
Type
string
Properties
Create, Filter, Group, Sort, Update
Description
The action label.
NamespacePrefix
Type
string
Properties
Filter, Group, Nillable, Sort
Description
The namespace of the action.
OptionsCreateFeedItem
Type
boolean
Properties
Create, Filter, Update
Description
Indicates whether successful completion of the action creates a feed item (true) or not (false). Applies only to Create Record, Update Record, and Log a Call quick action types. Available in API version 36.0 and later.
SobjectType
Type
picklist
Properties
Create, Filter, Group, Restricted picklist, Sort
Description
The associated object’s API name. For example, FeedItem.
StandardLabel
Type
picklist
Properties
Create, Filter, Group, Nillable, Restricted picklist, Sort, Update
Description
The standard label for the action. Valid values are:
  • ChangeDueDate
  • ChangePriority
  • ChangeStatus
  • CreateNew
  • CreateNewRecordType
  • Defer
  • EditDescription
  • LogACall
  • LogANote
  • New
  • NewChild
  • NewChildRecordType
  • NewRecordType
  • Quick
  • QuickRecordType
  • SendEmail
  • SocialPost
  • Update
SuccessMessage
Type
textarea
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The message that displays to the user upon successful completion of the action. Available in API version 36.0 and later.
TargetField
Type
picklist
Properties
Create, Filter, Group, Nillable, Restricted picklist, Sort, Update
Description
The API name of the parent object for the record created by this quick action. For example, CollaborationGroup.
TargetRecordTypeId
Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The ID of the target record type.
TargetSobjectType
Type
picklist
Properties
Create, Filter, Group, Nillable, Restricted picklist, Sort, Update
Description
The API name of the type of object record this action will create. For example, OpportunityLineItem.
Type
Type
picklist
Properties
Create, Filter, Group, Restricted picklist, Sort, Update
Description
The type of action. Valid values are:
  • Canvas
  • Create
  • LightningComponent (This value is available in API version 38.0 and later.)
  • LogACall
  • Post
  • SendEmail
  • SocialPost
  • Update
  • VisualforcePage
Width
Type
int
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The width of the action, in pixels. This field is set only when the quick action has a custom icon.

Usage

A QuickActionDefinition represents information about a quick action. The following example creates a global quick action that lets users quickly create a task.

1QuickActionDefinition qad = new QuickActionDefinition();
2qad.setDeveloperName("MyQuickCreateTaskAction");
3qad.setSobjectType("Global");
4qad.setTargetSobjectType("Task");
5qad.setMasterLabel("Quick create a task");
6qad.setType(QuickActionType.Create);
7qad.setDescription("Quickly creates a Task");
8
9sforce.create(new SObject[]{qad});