0

I have implemented some VF Pages that use lightningStylesheets="true". As internal user, the page is displayed properly, however when i log in as a Partner user, the pages are shown with the classic UI. Has anyone faced this issue? Any suggestions on how i can overcome it? Screenshots below: Internal user: enter image description here

Partner user: enter image description here

1 Answer 1

1

Can you try the approach mentioned in the article and see if it fixes the issue

Visualforce pages using lightningStylesheets="true" and that display with Classic styling in Lightning Experience are a result of the UserPreferencesLightningExperiencePreferred field for the user experiencing the behavior. In order to check the value for that field on a User record, you can use the following steps.

  1. As a System Admin user, run the following query in the Developer Console or Workbench: SELECT UserPreferencesLightningExperiencePreferred, Id, Username FROM User where id = 'userId'
  2. Check if the result of the query shows the UserPreferencesLightningExperiencePreferred field value as "false"
  3. When the field value is false, Visualforce pages with lightningStylesheets="true" will use Classic styling in Lightning Experience

This field value will usually change when users use the Lightning Experience Switcher to change between Salesforce Classic and Lightning Experience. If the user's Profile has the "Hide Option to Switch to Salesforce Classic" permission enabled, you will need to use the Salesforce Dataloader or a similar tool to update their User record to update their preferred UI experience.

3
  • 1
    Hi Swetha and thank you for your response. The field value at user level is set to "true". :( I suppose something has to do with the managed package from which this VF Page is invoked. I have a managed package that invokes my custom VF Page. When in Salesforce (Internal user) it pops-up in LEX, when in Community, it pops up Classic UI. So i will ask them for support... Jun 28, 2021 at 16:39
  • 1
    Great! Let me know how it goes... Jun 29, 2021 at 17:35
  • 1
    Hi Swetha, unfortunately, this is a Salesforce issue. In fact, lightningStylesheets isn's supported in Experience Cloud Sites. developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/…. I think i should reconstruct all the VF Pages and use the apex:slds option. salesforce.stackexchange.com/questions/195511/… Aug 26, 2021 at 9:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .