Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class isLightningUser {
- public static Boolean isLightningUser(){
- return [SELECT Profile.PermissionsLightningExperienceUser FROM User WHERE Id = :UserInfo.getUserId()].Profile.PermissionsLightningExperienceUser;
- }
- public static void sample(){
- if( isLightningUser() ) {
- // Do something for Lightning Experience
- }
- else {
- // Use classic
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement