• Bruce Tollefson
  • 0 Points
  • Member since 2015

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
  • 1
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');
<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:pageMessages id="msgs"/>