You need to sign in to do that
Don't have an account?
Running Service Cloud Console Javascript Within a Custom Button
I'm trying to use the same functions using javascript allowed on a visualforce page, but on a button.
IE: something alone these lines https://sites.secure.force.com/success/ideaView?id=08730000000YKxY
Problem is when I try running my javascript within my button... all browsers (Chrome, IE, and FireFox) throw exceptions with Salesforce javascript library....
Code is as follows:
{!REQUIRESCRIPT("/support/console/25.0/integration.js")} if (sforce.console.isInConsole()) { alert("in console"); } else { alert("not in console"); }
Javascript Error:
Uncaught TypeError: Cannot read property 'Caller' of undefined integration.js:10
(anonymous function) integration.js:10
(anonymous function) integration.js:782
If you can please point me in the right direction of how to resolve this issue, i would greatly appreciate this.
Answer was another JS library has to be included which gets included by VFpages automatcily when using the Console API.
code should now look like as follow to get the Cloud Console API to work within a button...