10

In Winter 17 Salesforce allows creating custom lightning quick actions and have associated interfaces and an event to close the quick action. I wonder if it is possible to invoke the quick action from custom lightning component directly?

3
  • Did you end up discovering if this was possible? :)
    – Clint
    Aug 2 '17 at 9:28
  • I have the same question
    – Patlatus
    Nov 4 '17 at 14:51
  • No I still don't have an answer to that.
    – Artur
    Nov 5 '17 at 15:29
1

Actually it is not even possible to open it through Apex code.

I created two actions. Lightning Action on Account and called it LA and Visualforce action on Account and called it VA.

When I try to execute this code

QuickAction.QuickActionRequest req = new QuickAction.QuickActionRequest();
req.quickActionName = 'Account.LA';
req.contextid = '001xx000003DGcO';
System.debug(LoggingLevel.ERROR, '@@@ req: ' + req );
QuickAction.QuickActionResult res = QuickAction.performQuickAction(req);
System.debug(LoggingLevel.ERROR, '@@@ res: ' + res );

I receive an error

System.UnexpectedException: ActionType LightningComponent not supported yet

and when I try to execute this code

QuickAction.QuickActionRequest req = new QuickAction.QuickActionRequest();
req.quickActionName = 'Account.LA';
req.contextid = '001xx000003DGcO';
System.debug(LoggingLevel.ERROR, '@@@ req: ' + req );
QuickAction.QuickActionResult res = QuickAction.performQuickAction(req);
System.debug(LoggingLevel.ERROR, '@@@ res: ' + res );

I receive an error

System.UnexpectedException: ActionType VisualforcePage not supported yet

So it is not only unavailable directly from Lightning, but it is also unavailable through Apex

5
  • It's an interesting test. I'm not entirely sure what apex could do with these though. Input and output parameters would be challenging to handle.
    – Artur
    Nov 5 '17 at 15:34
  • 1
    Actually I found a workaround for that. If you are interested I may actually post that
    – Patlatus
    Nov 6 '17 at 19:04
  • 1
    Yes please share your finding, it would be interesting to see what could be done.
    – Artur
    Nov 9 '17 at 18:24
  • @Patlatus Does URL hacks work for Quick Actions in LEX?
    – zuke
    Dec 18 '18 at 17:43
  • I think URL hacking doesn't work, actually I even forgot which exact workaround I meant last year
    – Patlatus
    Dec 20 '18 at 9:32

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.