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:
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.
- As a System Admin user, run the following query in the Developer Console or Workbench:
SELECT UserPreferencesLightningExperiencePreferred, Id, Username FROM User where id = 'userId'
- Check if the result of the query shows the UserPreferencesLightningExperiencePreferred field value as "false"
- 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.