Same Visualforce in classic and Lightning

Use Visualforce in Classic and Lightning Experience

This topic was subset of my presentation in Salesforce Boston World Tour 2017. Sometimes we find our-self in situation where custom Visualforce page should be displayed with Old theme in classic but with Lightning theme in Lightning Experience.

If you can convince client to use same user interface in classic and Lightning, then it would be an ideal approach. Even Salesforce displays classic user interface for many setup pages inside Lightning experience.

If client does not agree, then we simply need to detect that in which context Visualforce is running and then enable or disable the section as per UIThemeDisplayed global variable as shown in below Apex code snippet.

Posted

in

by


Related Posts

Comments

2 responses to “Use Visualforce in Classic and Lightning Experience”

  1. Manny Avatar
    Manny

    Hi Jitendra, I’d rather had the same question posted on your previous blog too. Which is from where you bind the filterId, listViewOptions variables are bind to in standard controllers? and there’s init(); method too. But i couldn’t find the implementation. Please help me to understand the concept here

    Many thanks,
    Manny

  2. Deepraj Avatar
    Deepraj

    Can you please help me on the lookup field UI change? once the VF page has been changed to match Lightning UI, if you click on any of the lookup fields on that VF page then it still opens in classic UI.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from Jitendra Zaa

Subscribe now to keep reading and get access to the full archive.

Continue Reading