4 个回答
I'm assuming this is no longer an open question. However in your open primary tab function change the false to true: sforce.console.openPrimaryTab(null, '/apex/CanvasAppPage?scontrolCaching=1&id={!contact.ID}', true, 'ClientView', openSuccess, 'salesforceTab');that should make it work Thanks for your response..its not helpfull. Your code and the code that i pasted does exactly the same..my issue is not opening a primarytab. issue is once i open a new primarytab focus needs to be shifted to th newly opend tab not the current one. if you look at the screenshot below once i click the clientview button its opening the newprimarytab called vlientview but the focus is still on oldtab. i want the focus to be shifted to new tab. Hi,Please check below blog for more information in console related post:-http://amitsalesforce.blogspot.in/search/label/Consolehttp://amitsalesforce.blogspot.in/2015/03/how-to-open-new-record-inside-console.html Include JS in VF page
<apex:includeScript value="/support/console/26.0/integration.js"/>
Write below Java Script code in VF page
<script>
function openTab(id, name)
{
if (sforce.console.isInConsole())
sforce.console.openPrimaryTab(undefined, '/' + id + '?isdtp=vw', true, name);
else
window.top.location.href = '/' + id;
}
</script>
Then use below link to open new record
Please let us know if this will help uThanksAmit Chaudhary<a href="⌗" onclick="openTab('{!Obj.id}''{!Obj.name}'); return false;">{!Obj.customKey}</a>