+ Start a Discussion
DeptonDepton 

Dynamic Dashboards refresh?

Hi,

 

Is there any way to refresh a Dynamic Dashboard?....

 

This is an amazing feature but have to refresh them manually is pretty annoying

Thank you!:)

Best Answer chosen by Admin (Salesforce Developers) 
Chris DaviesChris Davies

Depton:

 

<html>
<head>
<script type="text/javascript">
var run;
function refresh()
{
var dashboardButton = document.getElementById('db_ref_btn');
if (dashboardButton == null)
  {
  alert('Please add Dashboard Snapshot to the Home Page');
  }
else
  {
  dashboardButton.click()
  }
}
window.onload = setInterval(refresh);
</script>
</head>
</html>

All Answers

atul_Bharmalatul_Bharmal

Why don't you try Scheduled job in which you can refresh the dashboard dyanamically and even shcedule it for email distribution

 

Hope this helps..

 

If you thinks it is right please mark it as right

Chris DaviesChris Davies

I wrote a post a while back on how to refresh dashboard using javascript&colon;

http://chrisodavies.blog.com/?p=16

DeptonDepton

Thank you guys,

 

Atul, you cannot schedule Dynamic Dashbards, that is the matter of the question!

 

Chris, I have followed your intructions but nothing happened; Then I have tried the other solution with te Scontrol but then when looking at the home page component it shows the entire code:

 



Test
<pre><code lang="html">&lt;iframe name="rss_iframe" src="/servlet/servlet.Integration?lid=01NV0000000Ceak&amp;ic=1" width="0%" height="0"&gt;&lt;/iframe&gt;</code></pre>

 

Any suggestions?

Thank you

 



Chris DaviesChris Davies

Depton:

 

<html>
<head>
<script type="text/javascript">
var run;
function refresh()
{
var dashboardButton = document.getElementById('db_ref_btn');
if (dashboardButton == null)
  {
  alert('Please add Dashboard Snapshot to the Home Page');
  }
else
  {
  dashboardButton.click()
  }
}
window.onload = setInterval(refresh);
</script>
</head>
</html>

This was selected as the best answer
DeptonDepton

You are the man!!

 

This is absolutely fantastic!!

 

Thank you very much! :)

DeptonDepton

Just a quick question Chris

 

This works perfectly from the home page. But I have realise that if I go back to the Dashboard tab and look at the home page dashboard there, the last refreshed date is still the old one.

 

Is there any way to run the same script  in the dashboard page? This is because Dynamic Dashboards cannot be schedule and I would like to autorefresh them daily.

 

Thank you!!

Chris DaviesChris Davies

Hi Depton,

 

nice one thanks for picking up on the refresh date, I will take a look at the JS and get back to you.

DeptonDepton

Thanks Chris!!

 

This is Brilliant! Hope you can make it!! :):smileyhappy:

PCTechPCTech

Hi Chris -

This works great in IE, but it seems to break in Chrome? Looks as if the page is refreshing in an endless loop. Any fixes for Chrome?

Thanks!!

Micki

liualiua

This is what has worked for me, I might post it in the wrong discussion forum, anyway I hope it helps.

 

http://boards.developerforce.com/t5/Visualforce-Development/Auto-Refresh-Salesforce-com-Dashboard-page-for-displaying-on-a/td-p/665872