I a not sure if this is possible but I am trying to fire a global action from a lightning component button click. Open to other solutions.
I tried implementing it using the lightning:QuickActionApi. But it doesn't seem to work. https://developer.salesforce.com/docs/component-library/bundle/lightning:quickActionAPI/documentation
Below is my Component:
<aura:component implements="force:appHostable, flexipage:availableForAllPageTypes, flexipage:availableForRecordHome, force:hasRecordId" access="global">
<lightning:quickActionAPI aura:id="quickActionAPI" />
<lightning:button label="Select Update Case Action" onclick="{!c.fireGlobal}" />
</aura:component>
Below is my Controller Code:
fireGlobal: function (cmp, event, helper) {
var actionAPI = cmp.find("quickActionAPI");
var args = { actionName: "NewContact" };
actionAPI.invokeAction(args);
}
Error message:
{
actionName:"NewContact",
errors:["We can’t execute the API because the parent record isn’t selected."],
parentContext:null,
success:false,
targetName:undefined,
unavailableAction:true
}