Reply
Contributor
Deepam
Posts: 3
0

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?

Moderator
bob_buzzard
Posts: 6,407
0

Re: Fetching value from 'Viewing as' lookup on dashboard, to a 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.
--
Certified Salesforce Technical Architect, Developer, Advanced Developer, Administrator, Advanced Administrator, Consultant, Sales Cloud Consultant,Service Cloud Consultant
Force.com MVP | The Bob Buzzard Blog | Linked In | Twitter

I don't respond to private messages/emails asking for help.


Take the Bob Buzzard Sobject Fields quiz.