1

problem, i try to dynamically filter a report but i get an error.

The apex code to set the filter dynamically based on some conditions:

  filtre ='column:\'account.name\',operator:\'equals\', value:\'{us.name}\'';

and here the visualforce code:

<analytics:reportChart reportId="00Ob0000003nlBt" size="small" cacheResults="false" filter="{!filtre}" ></analytics:reportChart>

here is the error:

enter image description here

it's in french , here is the translation:

"Insert filter attributes with a valid JSON format."

Any ideas?

1 Answer 1

0

From the documentation on analytics:reportChart, it looks like your JSON format needs to be List<Object>, so it should look like:

filtre = '[{column:\'account.name\',operator:\'equals\', value:\'{us.name}\'}]';
0

You must log in to answer this question.

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