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
@ 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) 
Hi,

Greetings!

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"/>
</apex:page>

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:

https://www.jitendrazaa.com/blog/salesforce/dynamic-report-filters-in-salesforce/

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

Warm Regards,
Shirisha Pathuri