+ Start a Discussion
@ M  Coder@ M Coder 

show Dashboards on button click !!!!!! Urgent

Hello Guys , 

my scenario : 

On click of button (quick action) on account layout in lightning , based on the account id  as input , my dashboard data has to be seen in a new window  . 
basically i need to pass record id dynamicaly to dashboard
for example: account has 3 opportunities and 3 assets

User-added image
ShirishaShirisha (Salesforce Developers) 


If you would like to simply display the dashboard on the VF page then you can use the below code and create the button/edit the existing button to override with that VF page.
<apex:page >
 <apex:iframe src="https://na12.salesforce.com/01ZU0000000NHAt" scrolling="true" id="theIframe"/>

If you would like to change the datat based on the recordId then you would need to call the report where the data get generated and just displayed on the dashboard.

Dynamic filter values:


Kindly mark it as best answer if it helps so that it can help others in the future.

Warm Regards,
Shirisha Pathuri