function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Megan Moody 10Megan Moody 10 

Service Console tab opening

I have a VF page where I list family members of the contact who has been opened in the center console. This VF page is displayed as a side bar in the console. When the user clicks on the link to open the family member, it opens within the middle of the console. I'd like it to open the contact next to the original contact. It should make more sense in the screen shot.
  • The agent searches for and opens the service console for the contact Joffrey Lanister. 
  • Joffrey's details appear in the center of the console. The highlights panel (with very minimal information) is above it. 
  • The agent clicks on his mother, Cersei Lannister, from the right-side panel, which is a VF page. 
  • Right now the page is opening Cersei within the center console, as a subtab of Joffrey(where her name is highlighted in yellow). What I want is for Cersei to be opened as a primary tab next to Joffrey (where there's yellow highlighting with no tab open).  
User-added image

Does anyone know if I can do this? Here's the chunk of code from my VF page that is building the related list to display in the Family Members section.
 
</apex:pageBlock>

    <apex:pageBlock title="Family Members"> 
        <apex:pageBlockTable value="{!Records}" var="Record" > 
            <apex:column > 
                <apex:facet name="header">Name</apex:facet> 
                <apex:outputLink value="{!Record.ID}">{!Record.Name}</apex:outputlink>
            </apex:column> 
            <apex:column > 
                <apex:facet name="header">Member ID</apex:facet> 
                <apex:outputText value="{!Record.Member_ID__c}"/> 
            </apex:column>
            <apex:column > 
                <apex:facet name="header">suffix</apex:facet> 
                <apex:outputText value="{!Record.Member_ID_suffix__c}"/> 
            </apex:column>  
            <apex:column > 
                <apex:facet name="header">Gender</apex:facet> 
                <apex:outputText value="{!Record.Gender__c}"/> 
            </apex:column> 
            <apex:column > 
                <apex:facet name="header">Subscriber ID</apex:facet> 
                <apex:outputText value="{!Record.Subscriber_ID__c}"/> 
            </apex:column> 
        </apex:pageBlockTable> 
    </apex:pageBlock>

I tried adding a target value of _top and _parent, but neither of those worked. 

<apex:outputLink target="_top" value="{!Record.ID}">{!Record.Name}</apex:outputlink>

Any help is much appreciated. 
Amit Chaudhary 8Amit Chaudhary 8
Please check below blog:-
http://amitsalesforce.blogspot.in/search/label/Console

I hope that will help you.

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 .
<a href="#" onclick="openTab('{!Obj.id}''{!Obj.name}'); return false;">{!Obj.customKey}</a>

Please let us know if this will help you.

Thanks
Amit Chaudhary
amit.salesforce21@gmail.com