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(), upsert()

Supported REST HTTP Methods

DELETE, GET, PATCH, POST

Fields

Field Details
Description
Type
textarea
Properties
Filter, Group, Nillable, Sort
Description
The description of the action.
DeveloperName
Type
string
Properties
Filter, Group, Sort
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
Filter, Group, Nillable, Sort
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
Filter, Group, Nillable, Sort
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
Defaulted on create, Filter, Group, Nillable, Restricted picklist, Sort
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 Spanish (Mexico) falls back to Spanish for customer-defined translations.
  • Swedish: sv
  • Thai: th The Salesforce user interface is fully translated to Thai, but Help is in English.
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
  • deprecatedEditable
  • installed
  • installedEditable
  • released
  • unmanaged

This field is available in API version 38.0 and later.

MasterLabel
Type
string
Properties
Filter, Group, Sort
Description
The action label.
NamespacePrefix
Type
string
Properties
Filter, Group, Nillable, Sort
Description
The namespace of the action.
OptionsCreateFeedItem
Type
boolean
Properties
Filter,
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
Filter, Group, Restricted picklist, Sort
Description
The associated object’s API name. For example, FeedItem.
StandardLabel
Type
picklist
Properties
Filter, Group, Nillable, Restricted picklist, Sort
Description
The standard label for the action. Valid values are:
  • AddRecord
  • AddMember
  • ChangeDueDate
  • ChangePriority
  • ChangeStatus
  • CreateNew
  • CreateNewRecordType (For example, a label with something like “Create New Idea”)
  • Defer
  • EditDescription
  • Escalate
  • EscalateToRecord
  • Forward (Available in API version 42.0 and later)
  • LogACall
  • LogANote
  • New (A new record)
  • NewChild (A new child record)
  • NewChildRecordType
  • NewRecordType (For example, a label with something like “New Idea”)
  • OfferFeedback
  • Quick (A quick record)
  • QuickRecordType
  • Reply (Available in API version 42.0 and later)
  • ReplyAll (Available in API version 42.0 and later)
  • RequestFeedback
  • SendEmail (This value is available in API version 31.0 and later.)
  • Update
SuccessMessage
Type
textarea
Properties
Filter, Group, Nillable, Sort
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
Filter, Group, Nillable, Restricted picklist, Sort
Description
The API name of the parent object for the record created by this quick action. For example, CollaborationGroup.
TargetRecordTypeId
Type
reference
Properties
Filter, Group, Nillable, Sort
Description
The ID of the target record type.
TargetSobjectType
Type
picklist
Properties
Filter, Group, Nillable, Restricted picklist, Sort
Description
The API name of the type of object record this action creates. For example, OpportunityLineItem.
Type
Type
picklist
Properties
Filter, Group, Restricted picklist, Sort
Description
The type of action. Valid values are:
  • Canvas
  • Create
  • Flow (This value is available as a Beta in API version 41.0 and later.)
  • LightningComponent (This value is available in API version 38.0 and later.)
  • LogACall
  • Post
  • SendEmail
  • SocialPost
  • Update
  • VisualforcePage
Width
Type
int
Properties
Filter, Group, Nillable, Sort
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});