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
shrutiiiiishrutiiiii 

Add dashboard filter using apex code

Hii,
Can we add dashboard filter using apex code? How?

Sample dashboard filter
PratikPratik (Salesforce Developers) 
Hi Shruti,

You can create a Visualforce component in a dashboard, but I don't think you will be abale to add Dashboard filter value through Apex code.

Thanks,
Pratik