I have tried by giving id as null but still on click existing tabs get refreshed.

sforce.console.openPrimaryTab(null, pageName, true,'xyz',null,this.xyz, 'abz');

1 Answer 1


As per the salesforce console integration toolkit guide, openPrimaryTab() method takes 6 parameters, whereas you are passing seven. Please verify the same.

sforce.console.openPrimaryTab(id:String, url:URL, active:Boolean, (optional)tabLabel:String, (optional)callback:Function, (optional)name)

I tried the same example given in this link and the tab opens as a primary tab.

Also, if the tab is already open, then Salesforce console prevents opening duplicate tabs.

  • When quoting documentation, it is best to post a link to it.
    – Adrian Larson
    Feb 5, 2016 at 16:53
  • Your link is broken. "Sorry, the document you are looking for doesn't exist or could not be retrieved."
    – Adrian Larson
    Feb 5, 2016 at 18:14
  • tried that also but looks like null is also considered as ID. Getting exception "openPrimaryTab: Opening a duplicate tab is not allowed."
    – San
    Feb 8, 2016 at 7:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.