QuickActionListItem

Represents an item in a quick action list.

Version 

Introduced in API version 32.0.

Supported SOAP API Calls 

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

Supported REST API Methods 

DELETE, GET, HEAD, PATCH, POST, Query

Fields 

QuickActionDefinition 

  • Type: picklist

  • Required: No

  • Properties: Create, Filter, Group, Restricted picklist, Sort, Update

  • Description: The enum name or ID of the QuickActionDefinition that’s associated with this list item.

QuickActionListId 

  • Type: reference

  • Required: No

  • Properties: Create, Filter, Group, Sort

  • Description: The ID of the QuickActionList associated with this list item.

  • Relationship name: QuickActionList

  • Relationship type: masterdetail

  • Refers to: QuickActionList

SortOrder 

  • Type: int

  • Required: No

  • Properties: Create, Filter, Group, Sort, Update

  • Description: The order in which this list item appears in the picklist. This field must be an ordinal number greater than 0, and must be unique in the list.

Usage 

A QuickActionListItem associates a QuickActionDefinition with a QuickActionList. You can query to find out which quick actions are in a list, insert or delete to add or remove quick actions from a list, and update to change the order of quick actions in the list.

The following example reverses the order in the list of the actions, and then removes the first action from the list.

1String query = "SELECT Id,SortOrder FROM QuickActionListItem Where QuickActionListId='" + listId + "'"
2SObject[] records = sforce.query(query).getRecords();
3
4for(int i=0;i<records.length;i++) {
5   QuickActionListItem item = (QuickActionListItem)records[i];
6   item.setSortOrder(records.length-i);
7}
8
9sforce.update(records);
10
11// Last record in array is first record in reordered list
12sforce.delete(records[records.length-1].getId());

DID THIS ARTICLE SOLVE YOUR ISSUE?
Let us know so we can improve!