I have my own released managed package which is installed on dev environment. I have created VF page on this environment and included Visualforce component from managed package there. The VF component has the following code which is responsible for refreshing Service Console tab:
function refreshConsoleTab() {
sforce.console.getEnclosingPrimaryTabId(refreshSubtab);
}
var refreshSubtab = functionrefreshSubtab(result) {
var tabId = result.id;
sforce.console.refreshPrimaryTabById(tabId, true, refreshSuccess);
};
var refreshSuccess = function refreshSuccess(result) {
//Report whether refreshing the primary tab was successful
if (result.success == true) {
alert('Primary tab refreshed successfully');
} else {
alert('Primary did not refresh');
}
};
The above code works in the managed package, and tab is being refreshed. However, it doesn't work in the dev environment where the managed package is installed.
I'm allowed to get tabId inside of refreshSubtab function, but sforce.console.refreshPrimaryTabById() returns success=false.
Note: I use 36 version of integration.js
<apex:includeScript value="/support/console/36.0/integration.js"/>
Thank you in advance for any help you can provide.