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
Shankar Kumar 9Shankar Kumar 9 

Check in APEX if Lightning is enabled for current Org?

Hi
I want to check in apex whether Lightning is enabled for current Org?
 
Dhruv Gour 14Dhruv Gour 14
Hi Shankar kumar ,

1. If your apex code is called from a visual force page , and you just want to know that currently lighting experience is used or not , you can check in URL . 
ApexPages.currentPage().getURL().contains('Lighting')

2. I tried organisation.getSetting() method . but can not find whether lighting experience is enabled or not . 

I am tring searching and I will let you know .

Thanks ,
sh shsh sh
Hi Dhruv,
Many Thanks For your reply.

I want to know whehter Lightning enabled or not. when lightning is installed, user can toggle enable/disable and my requiremnet is same i.e. when lightning is installed whehter Lightning enabled or not.
Dhruv Gour 14Dhruv Gour 14
HI , 

I have posted an idea 

https://success.salesforce.com/ideaView?id=0873A000000LlGMQA0

please up vote it. 

If you found any workarround . please post it here 


Thanks
Dhruv