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
NagSDFCNagSDFC 

sforce.console.isInConsole() is not working in lightning console

I have a VF that uses the "sforce.console.isInConsole()" and changes the behaviour of Page in console. Its working fine in classic but its returning "False" in Lightning console. I triied but i didnt get any related info.
Can any one help me to resolve the issue
SandhyaSandhya (Salesforce Developers) 
Hi,

Check if you are doing the same as below 
<apex:page standardController="Case">
    <A HREF="#" onClick="testIsInConsole();return false">
         Click here to check if the page is in the Service Cloud console</A> 

    <apex:includeScript value="/support/console/44.0/integration.js"/>
    <script type="text/javascript">
        function testIsInConsole() {
            if (sforce.console.isInConsole()) {
                  alert('in console');
               } else {
                  alert('not in console');
            }
        }
    </script>
</apex:page>

https://developer.salesforce.com/docs/atlas.en-us.api_console.meta/api_console/sforce_api_console_isinconsole.htm
 
http://amitsalesforce.blogspot.com/search/label/Console
 
https://developer.salesforce.com/forums/?id=9060G000000XhB8QAK
 
   Please mark it as solved if my reply was helpful. It will make it available for other as the proper solution.
                                             
Best Regards
Sandhya
 
 
 
 
NagSDFCNagSDFC
Hi Sandhya,

Thanks for your reply. I tried the same but it is still returning "False" in the Lightning console.
Thanks,