function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
S_BatmanS_Batman 

Showing full dashboard on Home Page

Showing Full Dashboard on Home Page
I am trying to show the full dashboard vs preview on the Home Page Tab.

I created a VF page with the following:

<apex:page showheader="false" sidebar="false"> <apex:iframe src="/01Z14000000kQBw?isdtp=nv" scrolling="true" height="1000px" width="100%"/> </apex:page>

where the bolded is the Dashboard ID (everything after the "/" in the Dashboard URL)
When I go to preview it however, it's just a blank page.

any idea what could be wrong?


I also tried created a VF with the following:
User-added image


However the reports names do not show up, so I am able to differentiate each reports, is it possible to add the name?
SandhyaSandhya (Salesforce Developers) 
Hi,

To show full dashboard on the homepage, please follow below steps.

1. Go to setup

2. Type Homepage

3. go to homepage layout ---DE default---

4. check the dashboard checkbox then dashboard will appear on your homepage.

5. save

For the dashboard in visual force page
 
src="/01Z14000000kQBw?isdtp=nv" scrolling="true" height="1000px" width="100%"/> </apex:page>
 instead of Id, you need to give URL of the dashboard.

go to dashboard --- edit-- then copy the URL  and paste.

To get Report names, I think you need to write soql in the controller and fetch the name.
 something like below.
List<Report> ReportList;
Id myFolderId = [select id from folder where developername = 'MyFolder' limit 1].id;
if(myFolderId != null)
ReportList = [select id, name, description from report where ownerid = : myFolderid];

Hope this helps you!

Please accept my solution as Best Answer if my reply was helpful. It will make it available for other as the proper solution. If you felt I went above and beyond, you can give me kudos.
 
Thanks and Regards
Sandhya


 
S_BatmanS_Batman

Hi Sandhya,

Thank you for your response.

so for the dashboard URL, i went to dashboard>edit> copied the bolded part of the URL

https://myinstance.my.salesforce.com/01Z14000000kQBw/e?retURL=%2F01Z14000000kQBw

When I set the homepage layout to show the VF i created, and  test it on the home page; the Home Page loads, then goes to a new page which shows the dashboard, looks more like a screenshot vs being in salesforce.

Is there a way to show the dashboard within the home page without it loading to another page completely?

Thanks for your help!

SandhyaSandhya (Salesforce Developers) 
Hi,

Did you try these steps

1. Go to setup

2. Type Homepage

3. go to homepage layout ---DE default---

4. check the dashboard checkbox then dashboard will appear on your homepage.

5. save

Thanks and Regards
Sandhya