I am trying to have console app work in both SFDC Classic and Lightning. I'm trying to close a sub tab via some JavaScript code. With Classic Console I did the following:
sforce.console.closeTab(id, callback);
The above method written in JS is invoked from apex:commandbutton
with oncomplete
attribute.
As per the documentation provided in Console Developer guide, closeTab()
and getEnclosingTabId()
methods are supported in both Classic and Lightning and no additional considerations are required to make the methods work in Lightning. But I see that the closeTab()
functionality is not working as expected when accessed in Lightning experience.
I see there are some equivalent method which are supported only in Lightning Console here.
But this is called from within a Lightning component. How can I do that from a VisualForce page?