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
sneha gowdersneha gowder 

How to refresh Subtab(custom Visualforce page) in console

Please help me to refresh my custom visualforce page(VIEW FILES) in console


whenever i try to upload the document from FILE feed Item for perticular CASE from console, That document details should get listed in my Custom Visualforce page.

In this case i can see the uploaded document whenever i refresh the entire URL link.
please help me to refresh this automatically without refreshing the URL. User-added imageUser-added image
bhanu_prakashbhanu_prakash
Hi Sneha,
Mark as best answer, If it resloves !!
in script you need to use sforce.console.refreshSubtabById(subtabId, true, refreshSuccess);​ to load particular area
Sample code
<apex:page standardController="Case">

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

    <apex:includeScript value="/support/console/42.0/integration.js"/>
    <script type="text/javascript">
        function testRefreshSubtabById() {
            //Set the name of the tab by using the openSubtab method
            //This value is for example purposes only
            var subtabId = 'scc-st-0';
            sforce.console.refreshSubtabById(subtabId, true, refreshSuccess);
        }
        
        var refreshSuccess = function refreshSuccess(result) {
            //Report whether refreshing the subtab was successful
            if (result.success == true) {
                alert('Subtab refreshed successfully');
            } else {
                alert('Subtab did not refresh');
            }
        };
        
  </script>

</apex:page>
check link for more info
https://developer.salesforce.com/docs/atlas.en-us.api_console.meta/api_console/sforce_api_console_refreshsubtabbyid.htm
Mark as resloved if it helps :) :)
Thanks, 
Bhanu Prakash
visit ForceLearn.com​ (https://www.forcelearn.com)
sneha gowdersneha gowder
@bhanu_prakash  

Hi Prakash,

You are callng 'testRefreshSubtabById' through the link as below. but for my functionality the page should get refresh. so let me know how can i call this function on custom Visualforcee page.

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