You need to sign in to do that
Don't have an account?

Refresh Home Page and/or Dashboard
I had some success today refreshing dashboard and thought I'd share. I found some code from SF Heretic on refreshing homepages and dashboards, but it didn't quite work for me, though it got me pointed in the right direction which I greatly appreciate! Their code for refreshing the homepage didn't work for me the way it was setup. What did work was going to Homepage components and adding to the Messages & Alerts:
What I wanted to do was refresh a dashboard we have for mgmt users whenever they hit that page so they see the current numbers without having to click refresh. What I ended up doing was adding a component to the dashboard that was an S Control and all it contained was the following code where the ID listed is the ID of the dashboard. You can see the exact window open code I lifted below by going to the dashboard and with FIREBUG installed click INSPECT and select the REFRESH button on the page and it will show you something like the below....
Code:
Hope that helps some of you out there..........
E
<meta http-equiv=refresh content=600>And if you stay on the home page it does refresh after 10 minutes.
What I wanted to do was refresh a dashboard we have for mgmt users whenever they hit that page so they see the current numbers without having to click refresh. What I ended up doing was adding a component to the dashboard that was an S Control and all it contained was the following code where the ID listed is the ID of the dashboard. You can see the exact window open code I lifted below by going to the dashboard and with FIREBUG installed click INSPECT and select the REFRESH button on the page and it will show you something like the below....
Code:
<BODY onLoad="refreshDashboardTimeout();" > <script> function refreshDashboardTimeout() { window.open('/01Z6000000073av—m=poll&refresh=1', 'db_refresh_frame'); } </script>
Hope that helps some of you out there..........
E
Once you create the S-Control go to your dashboard and create a new component that is S-Control. I put no header, footer, and make the height 1, then stick that component at the bottom of the dashboard (it shows up as a line). In the S-Control it finds the ID of the dashboard using the URL and pageID variables, then the INT sets a variable to call the refreshnow function every X number of seconds. 600000 is about 10 minutes, turn it down to 100000 for testing and that refreshes every 5 minutes or so.
All Answers
Code:
Do you know if there is a way to have this refresh scheduled say every 30 or 60 mins using a scripting tool?
Once you create the S-Control go to your dashboard and create a new component that is S-Control. I put no header, footer, and make the height 1, then stick that component at the bottom of the dashboard (it shows up as a line). In the S-Control it finds the ID of the dashboard using the URL and pageID variables, then the INT sets a variable to call the refreshnow function every X number of seconds. 600000 is about 10 minutes, turn it down to 100000 for testing and that refreshes every 5 minutes or so.
Denis
I can see the browser come alive on queue but the date/time for the refresh is not being updated nor is the data contained in some of the report information that appears within the dashboard. I am using firefox if that makes any difference.
Any suggestions?
window.open(pageid + '?m=poll&refresh=1', 'db_refresh_frame');
I noticed that =view stays in the URL after the user exits Edit mode and then changes to a different dashboard. This means the user will have to manually remove the =view from the URL to cause other dashboards to automatically refresh. This isn't too big of an issue since the only users that will be editing a dashboard are administrators and they can be trained to watch for that. They don't care as much about the data as it is.
This was tested with IE 6.0, 7.0 and FF 3.0
Message Edited by Mycodex on 07-16-2008 12:39 PM
Message Edited by Mycodex on 07-16-2008 12:41 PM
Mycodex- I like that improvement. Thank you.
E
Thanks for such a speedy response. I'm using the following code as copied from the message board. I did correct the two '-m instances to be '?m and I'm using IE 7.0. When I click to the dashboard I can see at bottom left of screen (right above start menu) that the browser is constantly running a refresh or something. My reports are very small, they take about 10 seconds on manual refresh. So when this is looping for 2+min I assume it's not working correctly?
Message Edited by Mycodex on 08-25-2008 03:15 PM
Source File: https://cs2.salesforce.com/servlet/servlet.Integration?lid=01NR00000008dMR&ic=1
Line: 22
I'm not familiar 100% with javascript but countless websites on setInterval initialize the function in the same manner. EEE, any chance you can provide some assistance?
I went back and looked at some of the email I sent out to admins to configure machines to get this to work right and came up with a couple things. I always assume anyone using SF has these IE settings tweaked as they constantly cause us issues if they aren't..... That browsing history setting is a probably the issue if it's set to AUTOMATIC.....
E
On the machine open Internet Explorer and go to TOOLS + INTERNET OPTIONS.... Click the Browsing History SETTINGS button and verify the Temporary Internet Files and History Settings is set to check for newer versions of stored pages "Every time I visit the webpage".... Next go to TOOLS + POP UP BLOCKER + POP UP BLOCKER SETTINGS and uncheck the option to "show information bar when pop up blocked".
BINGO!
Thank you, EEE. I recently started using a new computer and hadn't done all the Salesforce.com browser configurations that are recommended.
Here they are if anyone else is looking for the full set:
https://na1.salesforce.com/_ui/training/help/pub/UserEdSolution?id=50130000000KUf4&retURL=https%3A%2F%2Fna5.salesforce.com%2F_ui%2Ftraining%2Fhelp%2FCombinedSearchPage%3Fstr%3Dbrowser%2Bsettings&ps=1&orgId=00D000000000062
Rhonda
Dear EEE,
I've used your S-Control and it worked like charm.
I'd also like to activate this refresh capability in the home page, but since I'm not a developer I do not know where I should hard code the url.
I'd be much obliged if you could guide me how to find the url and where to paste it into the code.
Thank you!
SS, take a look at the first post and the code snippet there.... If I remember right with the home page you create your home page dashboard and make one of the compnents the s-control that is going to call the code to refresh automtically and then you hard code the dashboard id in the window open, something like the below. I don't use it on the home page anymore so that isn't top of mind.......
window.open('/01Z6000000073av—m=poll&refresh=1', 'db_refresh_frame');
I know this is an old thread but it is one of my all-time favorites. I'm not a developer so I don't understand HOW the code provided here works, but when I added it for my users they love it. Until this week that is. Now, several users are getting this message pop up:
Unable to Access Page
Invalid parameter value "POLL" for parameter "m".
Error: The value of the parameter specified above contains a character that is not allowed or the value exceeds the maximum allowed length. Remove the character from the parameter value or reduce the value length and re-submit. If the error still persists, please report it to our Customer Support team and provide the URL of the page you were requesting as well as any other related information.
I did not change anything on my end, although we did have our org get upgraded to the Winter '11 release last weekend.
It doesn't occur on my computer, so I suspected browser settings and went through the salesforce recommended settings on one of my end-user systems, and it didn't fix it. Still suspecting browser settings since it doesn't happen on my computer, but not sure which setting it may be. We use Internet Explorer -- and don't have choice of changing.
Any ideas of how to address this error message?
Here's the specific line in the code which seems to be referred to in the message:
rpr2 replace that original window.open line with the one below and that got it working again.
//window.open(pageid + '?m=poll&refresh=1', 'db_refresh_frame');
to
window.open.location = '/'+pageid +'?customAutoRefresh=1';
// 10/13/10 - changed the call from m=poll to ?customAutoRefresh b/c of errors with WinterRelease 2011
@EEE - Thanks for the quick response! Making the change you provided got rid of the original error message, but the dashboard didn't refresh, and I noticed that IE had the error icon at the bottom of the screen. Here's what was in the details:
I'm pasting in the entire code I'm using so you can see if some other line also needs to be changed.
Rhonda
HI, i'm having exactly the same problem, any ideas on solution?
if i paste this line to the IE 'javascript:sfdc.analytics.quickfind.refresh%28false%29'
it does refresh ok
maybe this would be of any help , problem when i try to incorporate it into script it deos not work becasue it opens new window, any idea how to open the script in the existing window?>
I'm having the same problem as well, the error ,Invalid parameter value "POLL" for parameter "m". has been corrected but the dashboard doesn't refresh. Has anyone found a solution that has worked for them yet?
As we're not allowed to create S Controls anymore, do you know another way to perform the auto refresh ?