Salesforce: Impossible to invoke Lightning or Visualforce actions in Apex Code

When I saw QuickAction class and QuickAction.QuickActionRequest object I assumed that it supports Lightning and Visualforce actions, however, in fact, it doesn’t.

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

It is so big drawback that Actions invocation is not available neither directly from Lightning not through Apex

Advertisements
This entry was posted in Actions, lightning, salesforce, Uncategorized, visualforce and tagged , , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s