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
sf_evolutionsf_evolution 

Automatically update a page view?

 

I guess the Subject says it.

 

Is there a way to set up a page view so that it automaticaly updates, so that our CSR's don't have to constantly hit the refresh button?

 

 

Best Answer chosen by Admin (Salesforce Developers) 
kevindotcarkevindotcar

I figured out how to do it.

 

<apex:page standardController="MyObject__c"  id="page" >
    <apex:enhancedList type="MyObject__c" height="735" rowsPerPage="25" id="enhancedList"/>
  
<script type="text/javascript">
isListLoaded();
        
function isListLoaded(){    
 
     setTimeout("location.reload(true);",20000);
    // alert("reload...");

}
</script>
</apex:page>

 

All Answers

Santhosh KumarSanthosh Kumar

If you create Service Cloud consoles, it has the capability to auto-refresh based on the Streaming API. See if that works out for you.

kevindotcarkevindotcar

Hi Santosh,

 

Yes, it does look like Service Cloud would provide this function, but at $1620 / user / year, that seems kind of expensive for just one feature. I was just wondering if there was a more lightweight solution.

 

Santhosh KumarSanthosh Kumar

If it is a custom VF page, it would be easy to add that capability using Javascript timer object.

kevindotcarkevindotcar

Hi Santhosh,

 

It's a list view - and from what I've read, I think there's all sorts of problems with overriding a list view.

 

 

kevindotcarkevindotcar

I figured out how to do it.

 

<apex:page standardController="MyObject__c"  id="page" >
    <apex:enhancedList type="MyObject__c" height="735" rowsPerPage="25" id="enhancedList"/>
  
<script type="text/javascript">
isListLoaded();
        
function isListLoaded(){    
 
     setTimeout("location.reload(true);",20000);
    // alert("reload...");

}
</script>
</apex:page>

 

This was selected as the best answer