function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Jim F.ax281Jim F.ax281 

How to highlight tab in Lightning for VF page

Hi there,

I've got a VisualForce page that I display in the Lightning.  The only issue I'm facing is that, when I go to the page, it doesn't change the tab that is currently highlighted.  In the past, I could use the tabStyle property of <apex:Page to highlight a specific tab when the page was shown, but now it doesn't work.  I'm showing the page, rather than the associated tab, because I'm not able to pass parameters into the tab itself.

Any assistance appreciated! :)

Thanks, Jim
Rahul KumarRahul Kumar (Salesforce Developers) 
Hi Jim,
May I suggest you please refer the below link for reference. Hope it will be helpful.

Please mark it as best answer if the information is informative.so that question is removed from an unanswered question and appear as a proper solution.

Thanks
Rahul Kumar
Jim F.ax281Jim F.ax281
Hi Rahul,
Thank you for your response.  I do have a VF tab that is part of my managed package, and I've put it in my VF page definition.  When I click on the VF tab itself in Lightning, it highlights the tab every time.  However, what I'm doing is: I have a Lightning component decorated with lightningQuickAction, and in the controller I base64 encode JSON like {"componentDef":"one:alohaPage","attributes":{"address":"/apex/pfx__mypage?arg=1&arg2=3"}}, then redirect to one.app#<base64encodedstring>.  This works fine, but the tab isn't highlighted.  My page definition starts with:
<apex:page tabStyle="MyTab__tab">

From what I can tell, sforce isn't available in a Lightning component controller.

Unfortunately, neither of the links provided were able to help me highlight the tab.

Thanks again, Jim