I have an embedded VF page in the salesforce console and am trying to get the page to refresh when a user clicks a button. I have the functionality working in chrome, firefox, etc, but not in IE. Here is the VF component:
<apex:commandButton action="{!updateStatus}" onComplete="loadNext('{!myobj.id}');return false;">
and here is the JS:
<script type="text/javascript">
var rName, rId, curTabId;
function loadNext(recapId) {
rName = recapName;
rId = recapId;
sforce.console.getEnclosingPrimaryTabId(findCurTabID);
}
var findCurTabID = function findCurTabID(result) {
if (result.success == true) {
curTabId = result.id;
if(!rName) {
window.alert("There are no more un-closed records.");
sforce.console.closeTab(curTabId);
} else sforce.console.openPrimaryTab(curTabId, rId , true, rName, refreshSuccess);
}
};
var refreshSuccess = function refreshSuccess(result) {
//Report whether refreshing the primary tab was successful
if (result.success == true) {
console.log('Primary tab refreshed successfully');
} else {
console.log('Primary did not refresh');
}
};
</script>
What is the solution to get this working?