Be Good & Do Good!

Auto-Refresh Salesforce Dashboard every 5, 10 or 15 … seconds, minutes or hours …

UPDATE (7 Oct 2014) : This is now available in form of chrome extension, Try it out @ย AppExchange or https://chrome.google.com/webstore/detail/auto-refresh-salesforce-d/mogildlgjglckdcfclpbcbidpdkjgeebย orย http://satrangtech.com/products.htm#5

Is there a way we can have Salesforce Dashboard Auto-Refresh every few seconds (not recommended) or every x minutes or every x hours …?

Standard Out of box functionality does allow to refresh dashboard, but the lowest level of refresh interval is DAILY or WEEKLY or MONTHLY.

Lets say you want to have(display) a Sales Monitor always LIVE showing real time data, how do you achieve that?

There’s no direct way of doing it, but JS (as always) comes to the rescue …

  1. Log in to Computer (which is streaming output to LIVE monitor) , open Chrome browser (will try to update the script later to make it work in all browsers)
  2. Login to Salesforce and Navigate to desired Dashboard
  3. Delete url from ย address/url bar, type (or copy+paste) below code and hit enter in address/url bar. (Make sure javascript: at start is there, chrome does remove it when copy pasted)

    javascript:function autorefresh() {document.getElementById('refreshButton').click();setTimeout(autorefresh, 5000);}autorefresh();

  4. Now do a full screen and enjoy Dashboard Live Monitor ๐Ÿ™‚

ย Please Note:

  1. 5000 represents 5000 milli seconds ie 5 seconds, so change the same according to your requirements ie if you want it to refresh every minute change the value to 60000
  2. This is not a recommended way, as its a tweak and might not work in future. (But as of now its working great and helps in having real time monitor of your favorite dashboard, so enjoy!)

Might be this can be an admin tool or a chrome extension, will try to make one when I get time and chance ๐Ÿ™‚

39 Comments

  1. Jeff G

    Worked perfect for me – and its simple.

  2. Simon E

    Hi, should this still be working? Or has SFDC changed something to block? I am trying with a dynamic dashboard set as my name (I have full sys admin profile) but see no impact. In fact, browser reverts to prior/full URL with no refresh.

  3. Chirag Mehta

    @Simon : I just tried and its working like charm. You using chrome? If you need any assistance I’m online on skype @ “jain[dot]chirag”

  4. AdamD

    I’m interested in using this technique to display some key metrics on screens around the office. We’re looking at maybe a five minute refresh interval – are there any “hidden” considerations to doing this? The dashboard only has five elements on it so I’m thinking it wouldn’t have a huge impact on the system at all. Any other gotcha points like usage restrictions?

  5. Chirag Mehta

    Nope. This is JS trick, so nothing to do with salesforce. Anyhow you will be polling/requesting salesforce dashboard url every 5 minutes, that might end up in too many requests issue (which I never heard of), so relax and enjoy ๐Ÿ™‚

  6. Loveleen

    Hello Chirag,

    I have same problem as Simon is having “browser reverts to prior/full URL with no refresh”
    What is the fix??
    Also, do you have any idea how to display it via a visualforce page? I read a (ONLY one available) blog on internet but that didn’t work as well.

    Any help will be highly appreciated.

  7. Ofer Muki

    The script done the trick!!, my dashboard refresh automatically

  8. dave

    Hey i tried this but it didn’t work for me. I tried using the Java console within chrome but it didn’t work in there either. Any ideas?

  9. Niall Byrne

    This is AMAZING! I can’t believe how excited I was to get this working. ๐Ÿ™‚ Do I need to re-paste the script in every day? Not a big deal considering how often I have to click that refresh button. Any news on a chrome extension?

  10. Niall Byrne

    Make sure ‘javascript:’ is at the start. Chrome doesn’t paste this.

  11. dave

    it turned out the code just needed to be tweaked, may be due to a newer version of SF:

    javascript:function autorefresh() {document.getElementById(‘refreshInput’).click();setTimeout(autorefresh, 300000);}autorefresh();

  12. Chirag Mehta

    Converted this into Google Chrome Extension. Try it out @ https://chrome.google.com/webstore/detail/auto-refresh-salesforce-d/mogildlgjglckdcfclpbcbidpdkjgeeb/details (PS: This is still private and not published yet to public)

    Can you please try it out and share your valuable feedback. Once all seems good, will make it public and then you can start using it and even share with your salesforce colleagues.

  13. Chirag Mehta

    @disqus_sxSljLfDof:disqus @disqus_6IFmYIJ8ss:disqus – Converted this into Google Chrome Extension. Try it out @ https://chrome.google.com/webstore/detail/auto-refresh-salesforce-d/mogildlgjglckdcfclpbcbidpdkjgeeb/details (PS: This is still private and not published yet to public)

    Can you please try it out and share your valuable feedback. Once all seems good, will make it public and then you can start using it and even share with your salesforce colleagues.

  14. Chirag Mehta

    @Adam – Converted this into Google Chrome Extension. Try it out @ https://chrome.google.com/webstore/detail/auto-refresh-salesforce-d/mogildlgjglckdcfclpbcbidpdkjgeeb/details (PS: This is still private and not published yet to public)

    Can you please try it out and share your valuable feedback. Once all seems good, will make it public and then you can start using it and even share with your salesforce colleagues.

  15. Chirag Mehta

    @Simon – Converted this into Google Chrome Extension. Try it out @ https://chrome.google.com/webstore/detail/auto-refresh-salesforce-d/mogildlgjglckdcfclpbcbidpdkjgeeb/details (PS: This is still private and not published yet to public)

    Can you please try it out and share your valuable feedback. Once all seems good, will make it public and then you can start using it and even share with your salesforce colleagues.

  16. Kristoffer Qvist Tolbod

    Hi,
    this seems like a great extension to chrome.
    I have now installed it to my chrome browser. But when I am pressing the icon button it is showing a blank drop down box. Please see the image. Is that right?

    Thanks in advanced

  17. Chirag Mehta

    @kristofferqvisttolbod:disqus yes that’s right. As of now that drop down has no value (working on adding options there). Now navigate to dashboard page and you will see dashboard refreshing every 10 seconds. No need to click extension etc, once installed it will automatically work on dashboard page. Thanks a lot for trying out. Feedback is always welcome!

  18. Johnny

    Didn’t work for me. When I try to run the code above, console prints the error message shown below. Tried with document.getElementById(‘refreshInput’) and document.getElementById(‘refreshButton’):

    Uncaught TypeError: Cannot read property ‘click’ of null VM4507:1
    autorefreshVM4507:1
    (anonymous function)

  19. Sara Vreeland

    Hi Chirag –

    This is fantastic and while the javascript didn’t work for me, the extension did!
    Have you written anything that works in the same fashion but for the version of Chrome that is associated with GoogleTV?

  20. Chirag Mehta

    @sara_vreeland:disqus Apologies for late reply here! Not sure if something have changed, as I had written this JS almost 2 yrs ago. Please use chrome extension (see top of post for extension link) going forward, as I will be supporting/enhancing same going forward. Never tried version of Chrome that is associated with Google TV. Will need to try it out. Seems that all together different app that I will need to build.

  21. Chirag Mehta

    @disqus_6IFmYIJ8ss:disqus @disqus_sxSljLfDof:disqus @disqus_EIsyK4buUf:disqus Thank you guys! Apologies for late reply here. Things been crazy at my end. Not sure if something have changed, as I had written this JS almost 2 yrs ago. Instead of supporting same, I’ve converted same to chrome extension. Please use chrome extension (see top of post for extension link) going forward, as I will be supporting/enhancing same

  22. naveen

    Hi Chirag your solution is cool and i have tested in our Sandbox. As our dashboard contains huge data we would like to refresh it say once in 10 or 30 min. How can we do this with your chrome extension. ?

  23. Chirag Mehta

    @disqus_YJinAw4MXM:disqus I will need to update extension to read some config variable, so that end users can change/set refresh interval parameter. As of now the extension (on store) refreshes every 10 seconds.

  24. ?ukasz Pa?ys

    Hi, I’m trying to use it bit it doesn’t refresh a daschboard. Google Chrome Browser, it shows just a blank drop down box and nothing happens. Can anybody help me to solve issue ? lukasz@printdisplay.pl

  25. Michael Kevin Rebak

    There’s a chrome extension for this now:
    http://www.satrangtech.com/products.htm#5

    I’ve used it a little bit, and it’s awesome. The only limitation is that you’re restricted to refresh every 10 seconds.

  26. Chirag Mehta

    We cannot provide further lower refresh interval as then it will be literally like refreshing every second which might not even be readable as after every other second it will start refreshing again even before earlier refresh finished.

    Published this chrome extension in AppExchange too, view same @ https://appexchange.salesforce.com/listingDetail?listingId=a0N30000000q4pAEAQ. Don’t forget to leave your wonderful review ๐Ÿ™‚

  27. Chirag Mehta

    Can you please help with google chrome version on which it’s not working.

  28. Chirag Mehta

    Published this chrome extension in AppExchange too, view same @ https://appexchange.salesforce.com/listingDetail?listingId=a0N30000000q4pAEAQ. Don’t forget to leave a wonderful review ๐Ÿ™‚

  29. Chirag Mehta

    Update: We ‘ve published this chrome extension on AppExchange too, view same @ https://appexchange.salesforce.com/listingDetail?listingId=a0N30000000q4pAEAQ Don’t forget to leave a wonderful review ๐Ÿ™‚

  30. Chirag Mehta

    Update: @Simon – We ‘ve published this chrome extension on AppExchange too, view same @ https://appexchange.salesforce.com/listingDetail?listingId=a0N30000000q4pAEAQ Don’t forget to leave a wonderful review ๐Ÿ™‚

  31. Chirag Mehta

    Update: @Adam – We ‘ve published this chrome extension on AppExchange too, view same @ https://appexchange.salesforce.com/listingDetail?listingId=a0N30000000q4pAEAQ Don’t forget to leave a wonderful review ๐Ÿ™‚

  32. Chirag Mehta

    Update: Dave/Niall/Dave – We ‘ve published this chrome extension on AppExchange too, view same @ https://appexchange.salesforce.com/listingDetail?listingId=a0N30000000q4pAEAQ Don’t forget to leave a wonderful review ๐Ÿ™‚

  33. Chirag Mehta

    Update: @sara_vreeland:disqus We ‘ve published this chrome extension on AppExchange too, view same @ https://appexchange.salesforce.com/listingDetail?listingId=a0N30000000q4pAEAQ Don’t forget to leave a wonderful review ๐Ÿ™‚

  34. Chirag Mehta

    Update: @Lukasz – We ‘ve published this chrome extension on AppExchange too, view same @ https://appexchange.salesforce.com/listingDetail?listingId=a0N30000000q4pAEAQ Don’t forget to leave a wonderful review ๐Ÿ™‚

  35. nalpwa

    Hi Chirag,
    The extension is awesome and worked great for me. Rating 5 STAR.

    God bless you.

    Regards,
    Nilesh A.

  36. Trevis Dampier Sr.

    Awesome plugin! Works perfectly!!

  37. Chirag Mehta

    great! #HappyToHelp!

    Can you please write a review on Salesforce AppExchange too @ https://appexchange.salesforce.com/listingDetail?listingId=a0N30000000q4pAEAQ&tab=r

  38. Chirag Mehta

    great! #HappyToHelp!

    Can you please write a review on Salesforce AppExchange too @ https://appexchange.salesforce.com/listingDetail?listingId=a0N30000000q4pAEAQ&tab=r

  39. Chirag Mehta

    great, thanks!

    Can you please write a review on Salesforce AppExchange @ https://appexchange.salesforce.com/listingDetail?listingId=a0N30000000q4pAEAQ&tab=r

Leave a Reply

Your email address will not be published. Required fields are marked *