Go to Setup -> Object Manager -> Lead -> Buttons Links and Actions and override the List action with the page you just created.In lightning experience, go to the Sales Console and select Leads in the navigation menu.Your new page should appear instead of the normal lead list. Click the "New Tab" button on the page.A new console tab should open with the same page in it. In the javascript console, you'll notice a success message.In this list on the left, click the "New Tab" button again. This time, the new tab will not open and you will see the following error message: "Error: Invalid request."It appears to me that the salesforce console api breaks completely in the list side of the page once a console tab loads integration.jsA member of the Salesforce Technical Support team assured me that if I posted this here that Salesforce's Developer Experts would review my post and create a Known Issue. I look forward to your responses!<apex:page id="TestListPage" standardController="Lead" recordSetVar="records" >
<apex:includeScript value="/support/console/47.0/integration.js"/>
<script>
function openTab(){
sforce.console.openPrimaryTab(null, '/apex/TestListPage', true, 'PrimaryTab', function(result){
console.log(result);
});
}
</script>
<button onClick="openTab()">New Tab</button>
</apex:page>
Hi Alex,I replicated your mentioned steps and have come up to the same issue you are facing.I tried googling and found out to be the known issue, please refer - https://success.salesforce.com/issues_view?id=a1p3A0000008k7xQAA&title=sforce-console-openprimarytab-api-not-opening-a-tab-in-new-tab-and-throwing-javascript-error.It says this been resolved in Winter'18 but we both are still getting the same issue.