3

I'd like to use a CRM Analytics dashboard filtered by values from the page it is contained in e.g. the record ID from a details page.

The "LWC CRM Analytics Dashboard" component (screen shot below from the "Lightning App Builder") has a "Filter" property with "i" text of:

Create dashboard filters in the Filter Builder, or enter a JSON string. This property supports using an expression to define its custom label. The correct format is {!$Label.customLabelName}.

properties screen shot

Question 1

Is the JSON format this as described in the "filters JSON" section of the Analytics Dashboard JSON Developer Guide (this example using Salesforce Objects directly not through a dataset):

        "filters": [
            [
                "Type__c",
                [
                    "Energy"
                ],
                "in"
            ]
        ]

or something else?

Question 2

I don't see a way to inject context from the containing page e.g. for a record detail page the record ID. Is there a way to do that?

1 Answer 1

0

Just found this Embed Dashboards in Lightning Pages linked from the Analytics Templates Developer Guide. It does indicate that for LWC the filter input is JSON only (there is a "Filter Builder" button for Aura) and includes this documentation link of Syntax Reference Tables .

So think this answers question 1.

No sign of a way to inject context from the containing page, so I think the answer to question 2 is no.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .