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
arpit vijayvergiyaarpit vijayvergiya 

Header is not visible for visualforce page in lightning experience?

Hi all,

I cretaed a simple vf page. But when I preview it in lightning experience then, header is not visible. Available for Lightning Experience, Lightning Communities, and the mobile app is checked.

Here is code of page.
 
<apex:page standardStylesheets="true" doctype="html-5.0" showheader="false">
  <!-- Begin Default Content REMOVE THIS -->
  <h1>Congratulations</h1>
  This is your new Page
  <!-- End Default Content REMOVE THIS -->
</apex:page>
Thanks,
Arpit vijayvergiya
SandhyaSandhya (Salesforce Developers) 
Hi,

Make showheader="true" in your code.

Please mark it as solved if my reply was helpful, it will make it available
for others as a proper solution.

Best Regards,
​Sandhya
 
 
arpit vijayvergiyaarpit vijayvergiya
Hi Sandhya,

Making showheader="true" did not work for me. As well as there is a document of salesforce which says, showheader is always false in lightning experience.

https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_page.htm

Thanks
 
Ajay K DubediAjay K Dubedi
Hi Arpit,

The standard Salesforce Classic header and sidebar are always suppressed for pages when they’re displayed in Lightning Experience. 
In particular, the showHeader and sidebar attributes of <apex:page> have no effect on Visualforce pages when displayed in Lightning Experience.
Pages behave as though the showHeader and sidebar attributes of <apex:page> are both set to false.

showHeader Boolean value that specifies whether the Salesforce tab header is included in the page. If true,
the tab header is displayed. If not specified, this value defaults to true.
Note: In Lightning Experience and Salesforce1 the value of this attribute is overridden, and is always false.

Refer this URL:
https://trailhead.salesforce.com/modules/lex_dev_visualforce/units/lex_dev_visualforce_known_issues

Please let me know if you have any query.
Please mark it as best Answer if you find it helpful.

Thank You
Ajay Dubedi
arpit vijayvergiyaarpit vijayvergiya
Hi All,

I got an solution for it. It worked for me.
In classic we were redirecting to next page by user '/apex/pagename' in PageReference.
But in lightning I used '/one/one.app#/alohaRedirect/apex/pagename' for redirection. And the header on the next page is visible.

Thanks,
Arpit vijayvergiya
KARAN MONGAKARAN MONGA
Arpit thanks alot it worked .
Mayank Singh DelhiMayank Singh Delhi
Hi Arpit,

As per my observation, you might have previewed your page in the context of Lightning Experience and thats the reason neither header nor the side bar is showing inspite of making 'showHeader' & sideBar "True". I order to resolve this issue you have to open the new tab and pest the below link: https://SalesforceInstance/apex/AnyNewPageName then press enter, now you will see there is no such VF page exist. Then you just need to replace the "AnyNewPageName" with your "ActualVFpageName" and then enter, you will see the header and sidebar now. Thanks. Hope it helps!!
KARAN MONGAKARAN MONGA
Rather than using classic was to forward the request to the page . Use Lightning page redirect : *one/one.app#/alohaRedirect/apex/pagename*
Mayank Singh DelhiMayank Singh Delhi
Hi Karan,

But your solution doesn't work for me. Could you please tell me where i need to append URL suggested by you, i mean after my SalesforceInstance?
KARAN MONGAKARAN MONGA
You must be calling the vf page from custom button click or formula field add the logic there .