You need to sign in to do that
Don't have an account?

how to navigate to new primary tab automatically in Salesforce console?
using "sforce.console.openPrimaryTab" im opening a new primary tab in console and its a opeing a tab successfully. but i want to navigate automatically to new primary tab. is it doable in the console?
here is my code snippet.
<apex:page standardController="contact" extensions="XXXX" standardStylesheets="false">
<apex:includeScript value="/support/console/31.0/integration.js"/>
<script type="text/javascript">
function OpenClientViewTab() {
//Open a new primary tab with the ClientView home page in it
sforce.console.openPrimaryTab(null, '/apex/CanvasAppPage?scontrolCaching=1&id={!contact.ID}', false,'ClientView', openSuccess, 'salesforceTab');
}
</script>
<apex:form id="myform">
<apex:pageblock >
<apex:pageBlockButtons location="Top">
<apex:commandButton value="Client View" onclick="OpenClientViewTab();return false" styleClass="buttonStyle" style="background:LightBlue;width:80px;float:Center;" />
</apex:pageBlockButtons>
<apex:pageMessages id="msgs"/>
</apex:pageblock>
</apex:form>
</apex:page>
here is my code snippet.
<apex:page standardController="contact" extensions="XXXX" standardStylesheets="false">
<apex:includeScript value="/support/console/31.0/integration.js"/>
<script type="text/javascript">
function OpenClientViewTab() {
//Open a new primary tab with the ClientView home page in it
sforce.console.openPrimaryTab(null, '/apex/CanvasAppPage?scontrolCaching=1&id={!contact.ID}', false,'ClientView', openSuccess, 'salesforceTab');
}
</script>
<apex:form id="myform">
<apex:pageblock >
<apex:pageBlockButtons location="Top">
<apex:commandButton value="Client View" onclick="OpenClientViewTab();return false" styleClass="buttonStyle" style="background:LightBlue;width:80px;float:Center;" />
</apex:pageBlockButtons>
<apex:pageMessages id="msgs"/>
</apex:pageblock>
</apex:form>
</apex:page>
Please check below blog for more information in console related post:-
http://amitsalesforce.blogspot.in/search/label/Console
http://amitsalesforce.blogspot.in/2015/03/how-to-open-new-record-inside-console.html
Include JS in VF page
Write below Java Script code in VF page
Then use below link to open new record
Please let us know if this will help u
Thanks
Amit Chaudhary
primarytab called vlientview but the focus is still on oldtab. i want the focus to be shifted to new tab.
Did you find a solution for this?
sforce.console.openPrimaryTab(null, '/apex/CanvasAppPage?scontrolCaching=1&id={!contact.ID}', true, 'ClientView', openSuccess, 'salesforceTab');
that should make it work