I want to redirect user to a VF Page from a managed Package UI where code is written in Angular JS,
<div class="slds-no-flex">
<span><button class="slds-button slds-button" onclick="redirectToMap();" id="Btn" value="{{a.id}}">View Map</button></span>
JS
function redirectToMap() {
sforce.console.getEnclosingPrimaryTabId(openSubtab);
sforce.console.getFocusedSubtabId(closeSubtab);
}
var closeSubtab = function closeSubtab(result) {
var tabId = result.id;
sforce.console.closeTab(tabId);
};
var openSubtab = function openSubtab(result) {
var parentID = document.getElementById("Btn").value;
var primaryTabId = result.id;
sforce.console.openSubtab(primaryTabId ,'/apex/AccountDisplayVF?id=' + parentID,
true, 'New Map', null);
};
This isn't working . Anything I am missing?