I Need to create a visualforce page component to view dashboards in the homepage of salesforce CRM.

Update the Visual force page that i am using as component is:-

 <apex:page showHeader="false" sidebar="false">
 <apex:iframe src="/01Z28000000E2un" scrolling="true" id="theIframe"/>  

now what it is doing is sending me to this url:-


leaving the page


However want to show this dashboard on the same page in the visualforce component.


  • Thanks for your reply.i have created a dashboard and also a visualforce page.this visual force page added as a component in home page now i want to call that dashboard in visual force page.done googling,got a solution to add iframe tag like <iframe src="/01Z?isdtp=mn" width="100%" height="500"></iframe>. But when i am refreshing the page it dirctly send me that report page however i want me to show that dashboard at home page component without leaving the current page. Jun 12, 2015 at 13:35

3 Answers 3


You can take help from the below link. https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_quick_start_basic_dashboard_components.htm

  • Thanks for your reply.my requirment is that, i want to call dashboard in my visualforce page and then that visualforce page need to be called as component at home page.so that my dashboard can be viewed from home page.Can u pls suggest me how can i call dashboard in my visualforce page? Jun 12, 2015 at 12:57
  • You can display Dashboard in visualforce page like this : <apex:page > <apex:iframe src="na12.salesforce.com/01ZU0000000NHAt" scrolling="true" id="theIframe"/> </apex:page> Here src is the source of the Dashboard. Then add this vf page in the home components. Plz mark as best answer if it solves your problem. Thanks Jun 12, 2015 at 13:44
  • Thanks for your reply.i have updated my question pls view it as i have to do it as soon as possible. Jun 15, 2015 at 6:23

Make sure that under Security Controls _ session Settings, the enable clickjack protection for non setup SF pages and for customer VF pages with standard headers checkboxes are UNCHECKED. If they are checked send a request to SF to uncheck it for you and it will work the way you want it..


I believe you would use something like this:

<apex:page >
 <apex:iframe src="/(Insert dashboard Id & remove parenthesis)"/>  
  • Thanks for your reply.it is working but redirecting me to the dashboard link,leaving the page /home/home.jsp.However i want to be on the same page and show the dashboard on my visualforce component. Jun 12, 2015 at 14:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .