+ Start a Discussion
Brian ZardusBrian Zardus 

Custom Detail Page Button in Lightning renders Visualforce page so that Chrome, or Firefox, extensions cannot properly read

I have several Visualforce pages, and depending on whether they are rendered in Lightning, or Classic, effects whether I can any use any of Chrome's (or Firefox's) screen-capture extensions. 
 
For instance, if I navigate to my vfPage using the following Classic URL:  https://res-group--c.na46.visual.force.com/apex/vfPageName 
It renders the page, so that my screen-capture extensions can scroll the entire vfpage correctly.
 
On the other hand, if I navigate to my vfPage using the Lightning URL:
https://namespace.lightning.force.com/one/one.app#/alohaRedirect/apex/vfPageName
It renders the page so that my extensions are unable to scroll down in order to capture the entire view. 
 
​No matter which link is clicked, the vfPage is rendered using the appropriate Lightning stylesheets, so they both look the same.  I realize I could use a custom Detail Page Link URL to open my Visualforce page, but I'd prefer to use a custom Page Button instead. (And Custom Page Buttons always open the vfPage using the Lightning framework).
 
Any ideas for how use solve this would be appreciated.
bhanu_prakashbhanu_prakash
Hi Brain,

Try to add lightningStylesheets="true" in your Visual Force pages . It can automatically turn into lightning UI when ever user login in Lightning and it works classic view when user changes into classic 
Ex:  <apex:page lightningStylesheets="true">

check these https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/vf_dev_best_practices_slds_lightningstylesheets.htm
let us know if it helps you and mark it best if it helps you

Thanks, 
Bhanu Prakash
visit ForceLearn (https://www.forcelearn.com)for salesforce Latest Updates and development tips