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

Refresh Service Console Tab from inline Visualforce "Save"

Hi - 

I have an inline visualforce page, which is pretty basic: 

<apex:page standardController="Account" tabStyle="Account">
    <script src=""></script>
    <script src=""></script>
    <script src="/support/console/29.0/integration.js" type="text/javascript"></script>
    <apex:includeScript value="/soap/ajax/32.0/connection.js"/>
    <apex:includeScript value="/soap/ajax/32.0/apex.js"/>
    <link rel="stylesheet" href=""/>
    <apex:form id="formID">
        <apex:pageBlock title="Add/Update Account Address" >
            <apex:pageBlockButtons location="top">
                <apex:commandButton value="Update Account Address" action="{!save}" id="inlineEditSave" onclick="RefreshPrimaryTab('{!Account.Id}')"/>
                <!-- <apex:commandLink value="Update Account Address" action="{!save}" target="_parent" styleClass="btn" style="text-decoration:none;padding:4px;"/> -->
            <apex:messages />
            <apex:pageBlockSection title="Add/Update Account Address" collapsible="false">
                <apex:repeat id="fieldSetRepeat" value="{!$ObjectType.Account.FieldSets.SampleFieldSet}" 
                    <apex:inputField value="{!Account[field]}" required="{!field.required}"/>
        <script type="text/javascript">
            function RefreshPrimaryTab(id) 
                if(sforce.console.isInConsole()) {
                    // alert(sforce.console.isInConsole());
                } else {
                    //Standard functionality

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


On my page, I have a fieldset to utilize a mananaged package for Address updates. The fieldset contains the Address fields on the Account object, the user enters their data and hits the "Add Update Account Address", which performs the standard "Save" action. I need to reload the page in the Service Console to show the user the updated address. Unfortuantely, the javascript I have written fires faster than the records save to the database, so it is showing as the old value. 

Any assistance is greatly appreciated. 


I'll put this out there in case anyone else suffers this probelm in the future. 

I simply had to change my action to "quicksave" instead of "save" and I was then able to utilize calling the javascript function on the "oncomplete" vs the "onclick" in the button.