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
Rahul Saxena 21Rahul Saxena 21 

Screen refresh in Classic Service Console

Hi, I am working on classic service console and launching a lightning modal form using VF page on Case standard screen. When I am trying to close the modal i want the screen behind to refesh. I have used window.reload in the lightning component but it is giving me intermittent issue. Screen goes blank sometimes. Not sure if this is due to iframe or not. But once i clear my cache then this issue doesn't turn up.
Please help.
Thanks in advance.

Regards,
Rahul
Raj VakatiRaj Vakati
Use the console api method 
refreshPrimaryTabById
 
<apex:page standardController="Case">

     <A HREF="#" onClick="testRefreshPrimaryTabById();return false">
         Click here to refresh a primary tab by id</A> 

    <apex:includeScript value="/support/console/45.0/integration.js"/>
    <script type="text/javascript">
        function testRefreshPrimaryTabById() {
            //Get the value for 'scc-pt-0' from the openPrimaryTab method
            //This value is for example purposes only
            var primaryTabId = 'scc-pt-0';
            sforce.console.refreshPrimaryTabById(primaryTabId, true, refreshSuccess);
        }
        
        var refreshSuccess = function refreshSuccess(result) {
            //Report whether refreshing the primary tab was successful
            if (result.success == true) {
                alert('Primary tab refreshed successfully');
            } else {
                alert('Primary did not refresh');
            }
        };
        
  </script>

</apex:page>

 
Rahul Saxena 21Rahul Saxena 21
Hi Raj,
Thanks for your response. I have treid the approach you have mentioned. It works fine when I am working only in classic but since i am launching a lightning app from classic console via VF page. Passing refernce back to the VF does not allow to add listener to hold the reference.
Regards,
Rahul