Allows custom components to get a list of the available fields for a specific action on a record page.
Arguments
| Name | Type | Description |
|---|---|---|
| actionName | string | The 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:
actionName: "Case.LogACall"
Sample Code
getAvailableActionFields : function( cmp, event, helper) {
var actionAPI = cmp.find("quickActionAPI");
var args = {actionName :"Case.LogACall", entityName:"Case" };
actionAPI.getAvailableActionFields(args).then(function(result){
//All available action fields shown for Log a Call
}).catch(function(e){
if(e.errors){
//If the specified action isn't found on the page, show an error message in the my component
}
});
}
Response
Returns a Promise. Success resolves to a response object. The Promise is rejected on error response.
success: true,
fields:
{fieldName: "Subject", type: "textEnumLookup"}
{fieldName: "Description", type: "TextArea"}
{fieldName: "WhoId", type: "Lookup"},
errors: []