• Bruce Tollefson
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
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>