getAvailableActionFields

Allows custom components to get a list of the available fields for a specific action on a record page.

Arguments 

NameTypeDescription
actionNamestringThe name of the quick action that you want to access.

The actionName parameter starts with the Salesforce object, followed by the quick action name. For example:

1actionName: "Case.LogACall"

Sample Code 

1getAvailableActionFields : function( cmp, event, helper) {
2        var actionAPI = cmp.find("quickActionAPI");
3        var args = {actionName :"Case.LogACall", entityName:"Case" };
4        actionAPI.getAvailableActionFields(args).then(function(result){
5            //All available action fields shown for Log a Call
6        }).catch(function(e){
7            if(e.errors){
8                //If the specified action isn't found on the page, show an error message in the my component 
9            }
10        });
11    }

Response 

Returns a Promise. Success resolves to a response object. The Promise is rejected on error response.

1success: true,
2fields:
3    {fieldName: "Subject", type: "textEnumLookup"}
4    {fieldName: "Description", type: "TextArea"}
5    {fieldName: "WhoId", type: "Lookup"},
6errors: []