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
Suresh Kumar 34Suresh Kumar 34 

Highlight panel is not refreshing in service cloud console.

Hi Guys,

I am updating the case status through vf page,its updating in the record but status is not updating in highlight panel unless we refresh the page.

I there any possibility to refresh highlight panel after updating the record.

Thanks,
Suresh.
karthikeyan perumalkarthikeyan perumal
Hello, 

Basically my problem was this:
1.I open a Case as a sub tab of an Account record
2.Highlight panel opens with some Accounts fields
3.Click Edit button on Case detail
4.view Edit button send the sub tab to a custom VF page to edit Case fields
5.Click Save button on VF page to store Case data
6.Before the VF page unload, i call from javascript the function to refresh the primary tab. That's because when i save a Case the controller action    executed modify also some fields on the Account record
8.If i click on the Deatil subtab of the Account record i can see the fields correctly updated.
9.but the same field on the highlight panel shows the old value!
This is the best way i found to reproduce the standard experience with Service Console.
 
<apex:page standardController="Case" extensions="Case_extension" tabStyle="Case">

<script src="/support/console/34.0/integration.js" type="text/javascript"></script>
<script type="text/javascript">

        var j$ = jQuery.noConflict();
        j$(document).ready(function() {
            console.log('getting primary tab id');
            sforce.console.getEnclosingPrimaryTabId(getPrimaryTabId);
            console.log('getting current subtab id');
            sforce.console.getEnclosingTabId(getSubtabId);
        });

        /*
         *   Called when user press "Salva" button.
         *   If page was loaded in console close and open current primary tab
         *   to refresh Account indicators, righside and leftside bar
         */
        function setBeforeUnloadEvent() {
            window.onbeforeunload = function(e) {
                if (sforce.console.isInConsole() && '{!Case.Id}') {
                    //First find the ID of the current tab to close it
                    console.log('refreshing');
                    refreshTabsAfterSave();
                }
            }
        }

        function refreshTabsAfterSave () {
            console.log('getting link');
            sforce.console.getTabLink(sforce.console.TabLink.PARENT_AND_CHILDREN, currentPrimaryTabId, refreshPrimaryTab);
        }

        var refreshPrimaryTab = function refreshPrimaryTab (res) {
            console.log('tab link is: ', res);

            sforce.console.openConsoleUrl(currentPrimaryTabId, res.tabLink, true, [], [], afterRefresh);
        }

        var currentSubTabId; // set on page load
        var currentPrimaryTabId; // set on page load

        var getPrimaryTabId = function getPrimaryTabId (result) {
            console.log('primary tab id is: ', result.id);
            currentPrimaryTabId = result.id;
        }

        var getSubtabId = function getSubtabId (result) {
            console.log('sub tab id is: ', result.id);
            currentSubTabId = result.id;
        }

        var afterRefresh = function afterRefresh (res) {
            console.log('after refresh, get enclosing tab');
            sforce.console.getEnclosingTabId(getEnclosingTab);
        }

        var getEnclosingTab = function getEnclosingTab (res) {
            console.log('enclosing tab is: ', res.id);
            sforce.console.closeTab(res.id);
        }
    </script>

<apex:form>
  <apex:pageblock>

   <apex:pageBlockButton>
      <apex:commandButton value="Save" action="{!customSave}" onclick="setBeforeUnloadEvent()"  />
   </apex:pageBlockButton>


   <!--- all your page code --->
</apex:page>

Hope this will help you. 

Reference From : http://salesforce.stackexchange.com/questions/84943/service-console-highlight-panel-not-refreshing

Thanks
karthik