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
Jeff KranzJeff Kranz 

Detecting Lightning Experience in a Tab Override VisualForce Page

Here's my business case: we have a few VisualForce pages that we use in Classic to override the Tab View. When we migrate to Lightning Experience, these Tab View VF pages will no longer be necessary. However, during the transition period, we need users in Classic who navigate to the tab to see the custom VF page, while users in LEX who navigate to the same tab to see the standard Lightning tab view.

There are a few methods I'm aware of to detect which UI theme a user is currently in. My first thought was to use the JavaScript Lightning navigation methods to force the user to navigate to the standard tab view UI, but the current navigation options feel lacking. Closest thing I see is navigateToList(​) but that requires you to specify a ListView. I'd prefer it to be ListView agnostic as we have to roll this out to many tab across many clients.

Is there another way to do this? Maybe hack the URL of the default lightning tab view and force a redirect to that URL? (Yuck, that seems worse than the solution above as I type that out and read it back)
Yogesh SheteYogesh Shete
Hi Jeff,

You can create one classic app for classic users and one Lightning app for Lightning users. You can manage both app independently to show specific custom tabs for classic and standard Lightning tabs for Lightning.

Please refer

Best Regards,
Yogesh Shete.