We're in transition from classic to lightning and are working to update several of our javascript buttons over into lightning components, quick actions, etc. I have one javascript button that calls a visualforce page that launches a flow. If I convert this over to a quick action, I like how it displays as a model popup within the page instead of opening in a new tab. My beef is the placement of the action as it's collapsed where the standard buttons show. To help keep these visible, I have created a custom button panel (lightning component) to highlight some of our most frequently used custom actions. My challenge is that I'm having trouble calling that quick action from my custom button panel. Here's my Custom Object Action: Here's my component code:
"/> " fields="['Account__c', 'OwnerId']" targetRecord="" targetFields="" mode="EDIT"/> "/> "/>
Here's the controller code I thought for sure would work:
closeHelpTicket : function(component, event, helper) < var actionAPI = component.find("quickActionAPI"); var fields = >; var args = ; actionAPI.setActionFieldValues(args).then(function(result) < actionAPI.invokeAction(args); console.log('closeHelpTicket action called'); //Action selected; show data and set field values >).catch(function(e) < if(e.errors) < console.log(e.errors); >>); >
Here's what I'm seeing from the console after I click the button from the console component. What am I missing?