top of page

Set Lightning Experience as default for users

Dec 6, 2018
2 min read

Hola Ohana! 😀

In this article, we shall learn how we can set Lightning Experience as default for users belonging to a particular profile.

Use case:

Chi-Chi, a Salesforce Administrator at Capsule Z, got feedback from their org users(Profile: Standard User) that they would like to set Lightning Experience as their default UI when they login. Sometimes, users switch to Classic interface and forget to switch the UI back to Lightning before logging out.

Now it’s time for Chi-Chi to put her admin skills to use. Let’s take a look at how she did it!

Key elements involved in this approach:

  • Visual Flow

  • Login Flow

Step 1: We kick off by creating two variables in our flow.

Go to Setup and search for ‘Flows’. Click on ‘Flows’ and click ‘New’. And create variables as shown.

varLoginUserID
varUserName

Step 2: Next, we will do a record lookup to get the name of the logged in user.

RecordLookup

Step 3: Now, we set the UI to Lightning for the logged in User using the Record Update flow element. This is where the magic happens.

On User object, there is a standard field named, UserPreferencesLightningExperiencePreferred which keeps track if the user is in Lightning or Classic. Setting this field to true will force the Lightning UI. And setting its value to false will force the Classic mode.

So, we will set this value to true using Record Update element for the current user.

RecordUpdate

Step 4: Now, we add a Screen element to display a message. This step is optional and depends upon how you want to set it for your users.

DisplayScreen

Final Flow:

Final Flow

Save and activate the flow.

Step 5: Now, we create a login flow for our flow as shown.

LoginFlow

And we are all set!

Demo:

Demo

NOTE: For this to work, users must have the Lightning Experience User permission assigned.

P.S. If you want to set Lightning as default all users, then we have a better option for this.

Default LEX for All

Thank you! 🙂

 
 
 

Comments


bottom of page