5

Can Lightning WorkspaceAPI be used to Open tabs in Visualforce Pages?

I have a custom console app that incorporates the integration toolkit function for opening tabs/subtabs involving multiple Visualforce pages. It is not feasible to rewrite the Visualforce page into components to open as tabs. Is there any way to have visualforce pages opened in lightning experience and be able to use openTab/SubTab functionality for the same.

1 Answer 1

2

One approach you can take is to create a lightning component, embed the VF Page in an iframe inside the lightning component.

From the VF page, you can use parent.postMessage to send messages to the parent lightning component. For example, whenever a link is clicked, send a postMessage to the lightning component with the record id as the message. The event listener in the lightning component can then use the Workspace API to open subtabs.

This way, the functionality of your VF page, which may include 3rd party scripts etc remains isolated in the iframe.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .