function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Shahana Ragupathy SumathyShahana Ragupathy Sumathy 

openPrimaryTab() not working

<apex:page>
<apex:includeScript value="/support/console/53.0/integration.js" />
<script type="text/javascript">
var primaryTabName = 'Acme';
function alertSuccess(result) {
if (result.success) {
alert('Operation is SUCCESS');
}
else {
alert('Operation FAIL');
}
}
//open primary tab
function openPrimaryTab() {
sforce.console.openPrimaryTab(null, '/005d0000006HkroAAC', true,
'SFDC', alertSuccess, primaryTabName);
}
</script>
<div id="result" />
<A HREF="#" onClick="openPrimaryTab();return false">openPrimaryTab</A>
<br/>
</apex:page>

This is always returning 'Operation FAIL'. Please help me here.
I want to open a new salesforce tab on clicking a link.
Suraj Tripathi 47Suraj Tripathi 47
Hi, shahana,
Please refer to this link -
https://salesforce.stackexchange.com/questions/138466/openprimarytab-function-does-not-work

Please mark it as the best answer, if it helps.
Thanks