+ Start a Discussion
Andee Weir 17Andee Weir 17 

Call Quick Action from Aura


We have a requirement to replace the Activity Timeline in the Account's side panel with a custom version that better meets our needs.  However we do not want to lose the functionality of creating a new Task/Meeting/Call that the Activity Timeline gives & would rethaer not spend time creating our own versions. 

My initial thought was to create an Aura compnent that was a wrapper of those quick actions e.g. :-

<aura:component implements="flexipage:availableForRecordHome" description="My Lightning Component">
    <lightning:quickActionAPI aura:id="quickActionAPI" />
        <lightning:button label="New Event" onclick="{!c.newEvent}"/>
Controller :-
    newEvent : function( cmp, event, helper ) {
        var actionAPI = cmp.find("quickActionAPI");
        var args = {actionName: "Event.New_Meeting_Retail"};
            //Action selected; show data and set field values
                //If the specified action isn't found on the page, show an error message in the my component

The quick Action looks like :-
screenshot of quickaction& my user's profile has access to the record type :-
screenshot of recordtype access
The quick action itself already exists on the page layout (hence why it appears in the Activities Timeline).

I've added the component to the side panel & the button appears but when I click it, nothing happens.  In the console log I see 'The action you specified isn’t available on the current record page.'

Also tried it with a create case record but same result.  Works fine if the quick action calls a flow.

Any help gratefully received!
ravi soniravi soni
hi Andee,
did you add the action button on current recordPage. this lightning:quickActionAPI will work when button is added on record page.
thank you