• Shahana Ragupathy Sumathy
  • NEWBIE
  • 0 Points
  • Member since 2021

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 0
    Replies
How can I disable tab refresh or page load (for a particular tab) while clicking a tab in the standard salesforce app. 
I have a search function on one of the tabs, when the page redirects to a new page, the results of the search are reset. How can I retain the search data.
<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.