4

I have some existing Lightning code that has started going wrong with Spring 19, and I'm not sure whether I was doing something wrong in the first place, or if this is a bug in the new release.

In my component, I have:

<lightning:quickActionAPI aura:id="quickActionAPI"  />
<lightning:button label="{!v.label}" onclick="{!c.clicked}" />

In the controller, I have:

({
    clicked : function(component, event, helper) {
        var actionAPI = component.find('quickActionAPI');
        var actionName = component.get('v.value');
        if($A.util.isEmpty(actionName)) {
            helper.showError(component, 'You must configure the Quick Action form element with an action');
        } else {
            actionAPI.selectAction({ actionName: actionName }).catch(function (e){
                console.log(e);
                helper.showError(component,
                '[' + e.actionName + '] ' + e.errors.reduce((accumulator, currentError) => accumulator  + currentError + ' ', ''));
            });
        }
    }
})

Now, as long as the action I wanted to fire was on the same page, clicking on the button in my component would open the modal dialog for the corresponding Quick Action. As of Spring 19, it doesn't work for actions hidden inside a sub-menu. All that happens is the action menu gets opened. e.g. with a menu like this:

Quick Action Menu

The visible action (New Personal Contact) works, but the ones in the menu (Create GP Record etc.) do not.

I've worked around it for now by increasing the number of "Visible Action Buttons" in the Lightning Page Layout, but that's pretty ugly.

Is that me misusing the Quick Action API? Or a Spring 19 bug?

  • 2
    This looks to be a bug, and reviewing the latest development notes for the Quick Action API, does back this up. developer.salesforce.com/docs/… "The Lightning Quick Action JavaScript APIs can only interact with quick actions that are targetable on the page. Review the following support. Targetable: An action that displays in the highlights panel, including the dropdown action overflow" – Paul Kissick Jan 8 at 11:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.