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
BondicloudBondicloud 

api console not working

<apex:includeScript value="/support/console/26.0/integration.js"/>
<A HREF="#" onClick="testIsInConsole();return false"> Click here to check if the page is in the Service Cloud console</A><br/><br/>
<script type="text/javascript">
window.onload =testIsInConsole();
function testIsInConsole() {
if (sforce.console.isInConsole()) {
alert("in console");
} else {
alert("not in console");
}
}

 

 

when i ececute this code it is giving as "not in console" eventhough i am in service console why?

pls help in this

Best Answer chosen by Admin (Salesforce Developers) 
BondicloudBondicloud
i disabled my developermode in my persona settings . now it is working.

All Answers

puneet-mishrapuneet-mishra

Do you have Service cloud License?

BondicloudBondicloud
i disabled my developermode in my persona settings . now it is working.
This was selected as the best answer