+ Start a Discussion

VF Dashboard disappears on refresh


Hello, I have seen a few threads from last year which where stating  that when a Visual force dashboard is refreshed by clicking on the button on the home page the visualforce component disappears.


I haven't been able to find a solution to this and was wondering if there is anyone has found a solution to this?


For some reason scheduled dashboard refresh updates the page fine, but this can only be run once a day. My organisation will need to refresh the dashboard in question several times a day.






Hmm.  I haven't experienced this myself.  The only thing I can think of to check is that the user carrying out the refresh has access to the visualforce page embedded in the dashboard.


Thanks for replying Bob, but the user is myself and being that I am the admin who created the object,all records and the VF page I do have access to it.


A link to the thread from a year ago is http://boards.developerforce.com/t5/Visualforce-Development/Visualforce-page-disappears-in-Dashboard-refresh/m-p/268821#M34566


One guy mentions a work around but didn't give details on it, this thread is a year old so i'm hoping someone found a solution or one of the updates may have corrected this.


Bummer.  I've just tried a couple of my dashboards with VF pages and they come through fine.  Is there anything special about your page and where it pulls information from?


I have run some testes on this and it appears that refreshing the entire home page by clicking on the home tab will refresh the VF page correctly, it only appears to be the actual refresh button.


This leaves me with the options of figuring out why clicking on the refresh button makes the VF dashboard disappear or find a way to remove/hide that button.


The code i have used if you are interested


Apex Class

public class retrieveBramhallLog 
  private ApexPages.StandardSetController controller;
    public String getTerminalName() 
        return 'Bramhall';

    public List<Daily_Log__c> getDailyLog()
                return [SELECT Id, Name, Issue_Type__c, test_time__c FROM Daily_Log__c
                        WHERE Terminal__r.Name = 'Bramhall' order by test_time__c desc limit 10];



VF Page

<apex:page controller="retrieveBramhallLog" tabStyle="Report">
    <apex:pageBlock >
        {!terminalName}'s Log entries'
        <apex:pageBlockTable value="{!dailyLog}" var="c">
            <apex:column >
                <apex:outputLink value="/{!c.id}" target="_blank">{!c.Name}</apex:outputLink>
            <apex:column value="{!c.Issue_Type__c}"/>
            <apex:column value="{!c.test_time__c}"/>


Ah - so is this refreshing the dashboard on the home page as opposed to the dashboard page itself?  I haven't tried that route - I'll do so now.



And I see exactly what you do!  Inspecting the page shows that divs are being drawn where the content should go.  i can't come up with any ideas at the moment - usually I try to influence the page via Visualforce, but if that isn't being refreshed its a bit tricky!


Bleh, I'm having the same issue with a custom visualforce dashboard component I built as well...I still haven't found a good workaround other than refreshing the whole home page. =\