You need to sign in to do that
Don't have an account?
Trying to Open a subtab on click on a buttin :- Caught with error >> "can not read property getFocusedPrimaryTabId in salesforce"
Hi All,
The expected scenario is on click of a button it should open a subtab in the service console.
Below is the code which i have put in the button java script code. However its not working and throwing the below error. Please do help.
// Start of the CODE
{!REQUIRESCRIPT("/soap/ajax/25.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/25.0/apex.js")}
{!REQUIRESCRIPT("/soap/ajax/25.0/integration.js")}
function testGetFocusedPrimaryTabId() {
sforce.console.getFocusedPrimaryTabId(showTabId);
}
var showTabId = function showTabId(result) {
alert('Tab ID: ' + result.id);
};
testGetFocusedPrimaryTabId();
// END of the CODE
Error thowing - can not read property getFocusedPrimaryTabId in salesforce
Regards,
Soumya Behera
The expected scenario is on click of a button it should open a subtab in the service console.
Below is the code which i have put in the button java script code. However its not working and throwing the below error. Please do help.
// Start of the CODE
{!REQUIRESCRIPT("/soap/ajax/25.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/25.0/apex.js")}
{!REQUIRESCRIPT("/soap/ajax/25.0/integration.js")}
function testGetFocusedPrimaryTabId() {
sforce.console.getFocusedPrimaryTabId(showTabId);
}
var showTabId = function showTabId(result) {
alert('Tab ID: ' + result.id);
};
testGetFocusedPrimaryTabId();
// END of the CODE
Error thowing - can not read property getFocusedPrimaryTabId in salesforce
Regards,
Soumya Behera
1) http://amitsalesforce.blogspot.com/search/label/Console
2) http://amitsalesforce.blogspot.com/2015/03/how-to-open-new-record-inside-console_3.html
Let us know if this will help you
Thanks
Amit Chaudhary
{!REQUIRESCRIPT("/soap/ajax/36.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/36.0/apex.js")}
{!REQUIRESCRIPT("/soap/ajax/36.0/integration.js")}
var url=encodeURI('https://salesforce.com');
sforce.console.getFocusedPrimaryTabId(function(enclosingResult){
sforce.console.openSubtab(enclosingResult.id, url, true, '', null);
});
Still i am getting the same error message.
Please do help.