I want to refresh the entire service console on clicking of the save button on the visual force page. The button is an inline visual force page. Any ideas?

<apex:includeScript value="/soap/ajax/26.0/connection.js"/>
<apex:includeScript value="/support/console/26.0/integration.js"/>
<script type="text/javascript">
function focusAndSave() {

  <apex:form >
    <apex:pageBlock id="pb">
        <apex:pageMessages id="errMsgsId"></apex:pageMessages>
        <input type="text" id="focusMe" style="display:none" />
        <apex:pageBlockTable id="table" value="{!candidateMap}" var="c">
            <apex:column value="{!candidateMap[c].Contact__r.Name}"/>
            <apex:column value="{!candidateMap[c].Submitted_at__c}"/>
            <apex:column value="{!candidateMap[c].Interview_Availability__c}"/>
            <apex:column value="{!candidateMap[c].Notice_Available__c}"/>
            <apex:column headervalue="Stage">
                <apex:outputfield value="{!candidateMap[c].Stage__c}">
                    <apex:inlineEditSupport event="ondblclick"/>
            <apex:column headervalue="Ideally looking for">
                <apex:outputfield value="{!candidateMap[c].Ideally_looking_for__c}">
                    <apex:inlineEditSupport event="ondblclick"/>
            <apex:column headervalue="Action">
                <apex:commandLink value="Save" action="{!saveCandidate}" rerender="errMsgsId,table" onclick="focusAndSave()" oncomplete="testGetFocusedPrimaryTabId()">
                    <apex:param name="candidateId" value="{!candidateMap[c].Id}" assignTo="{!candidateId}"/>
        <apex:panelGrid columns="7" style="margin: 0 auto;">
            <apex:outputLabel value="{!noOfRecords} records found"></apex:outputLabel>
            <apex:commandButton status="fetchStatus" reRender="pb" value="|<" action="{!first}" disabled="{!!hasPrevious}" title="First Page"/>
            <apex:commandButton status="fetchStatus" reRender="pb" value="<" action="{!previous}" disabled="{!!hasPrevious}" title="Previous Page"/>
            <apex:commandButton status="fetchStatus" reRender="pb" value=">" action="{!next}" disabled="{!!hasNext}" title="Next Page"/>
            <apex:commandButton status="fetchStatus" reRender="pb" value=">|" action="{!last}" disabled="{!!hasNext}" title="Last Page"/>
            <apex:outputLabel value="Page {!pageNumber} of {!pagecount}"></apex:outputLabel>

enter image description here

  • you need to refresh only tab or console ?
    – Ratan Paul
    Commented Nov 29, 2015 at 12:25
  • need to refresh the entire console.. so that all the opened pages shows the updated result Commented Nov 29, 2015 at 12:29

2 Answers 2


Refresh primary tab

<apex:page standardController="Case">
    <apex:includeScript value="/support/console/26.0/integration.js"/>
    <A HREF="#" onClick="RefreshPrimaryTab();return false">
        Click here to get the primary tab IDs</A> 
function RefreshPrimaryTab() 

        var showTabId = function showTabId(result) 
            var tabId = result.id;
            alert('Primary Tab IDs: primaryTabId ' + tabId );
            sforce.console.refreshPrimaryTabById(tabId , true, refreshSuccess);

        var refreshSuccess = function refreshSuccess(result) 
            //Report whether refreshing the primary tab was successful
            if (result.success == true) 
                alert('Primary tab refreshed successfully');
                alert('Primary did not refresh');


onclick of anchor tag call a RefreshPrimaryTab function

  • no still its not refreshing the whole console.. i gave it onComplete of the save hutton.. Commented Nov 29, 2015 at 12:38
  • Please tell me how to refresh the primary tab.. I am new to service console Commented Nov 29, 2015 at 12:40
  • @VetriselvanManoharan pls check my updated ans. I have tested my org. onComplete of the save button RefreshPrimaryTab function
    – Ratan Paul
    Commented Nov 29, 2015 at 13:29
  • hey @VetriselvanManoharan let me know if this works for you or not?
    – Ratan Paul
    Commented Nov 30, 2015 at 5:08

We Can also use window.top.location='/console'; to refresh entire console.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .