+ Start a Discussion

Fetching value from 'Viewing as' lookup on dashboard, to a Visualforce page controller


I have added a Visualforce page, having a chart, as a component on a standard dashboard, with 'with sharing' keyword , which allows the Vf page to run as the logged-in user.


But it doesn't work for the 'Viewing as' lookup field provided on Standard Dashboards.. Can anyone suggest how can i fetch value from the 'Viewing as' lookup field to the visualforce page controller?

You won't be able to do this I'm afraid, as the Visualforce page is served from a different domain to the standard dashboard page. The browser same origin policy won't allow you access to the standard page DOM that contains that lookup from the VF page as that could allow a cross site scripting attack.