+ Start a Discussion
DeepamDeepam 

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

Hi,

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?

bob_buzzardbob_buzzard
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.