Hello!
Our company is embedding some CRMA dashboards across some pages including the Account, Opportunity, Contact, and HomePage. Everything has been complete except for the homepage as we are looking for a way to make the dashboard on the homepage reflect only the user's team data. So for instance:
-Dashboard A is on the manager's homepage using Dataset "XYZ".
-There is a field in Dataset "XYZ" called "Reports To" which we want to reference in order to show the manager records created by users that report to the manager
-We essentially want Logged In User = Reports To
The issue is on the hompage ligthning page builder, we are not seeing a "filter buidler tool" and all my attempts at writing a JSON code similar to JSON filters that work on other record pages are not activating.
Can someone help me understand how to write a JSON filter to page on a CRMA dashboard embedded on the homepage to reference a given field in a dataset vs the logged in User ID?
Here is the example of the code I tried thus far with no success:
It is also worth asking - is thee a way to write this filter in the dashboard code instead of on the lightning page?
Much thanks in advance!!
@* CRM Analytics (fka Tableau CRM) *
Filters on embedded dashboards work for data coming from current records only. On a homepage, you don't have a record from where you can receive any value.
Thus you have to build the logic into the dashboard itself. Please have a look into
https://help.salesforce.com/s/articleView?id=analytics.bi_dashboard_initial_filters_user_tokens.htm&type=5to get an idea on how this would work.
Technically, you receive the relevant value using a direct (SOQL) query. Then you apply this filter on any list selector which is based on the "reports to" field, so you have only one value left. With the selection type "single required", this value will be selected and applied to your dashboard.