2

I have created a vf page with a standard controller equal to the Account Object. In the report that I am trying to bring in on the vf page it has the Invoice_History__c object and the Account object on the report. I used this code line to bring in the report

<analytics:reportChart reportId="00OK0000000PLDV" 
                       filter="{column:'Id', operator: 'equals', value: '{!Id}'}" size="small">
</analytics:reportChart>

but everytime it states "For the filter 1: Specify a valid filterable column because Id is invalid"

I have tried using Account.Id, AccountId, Id, Invoice_History__c.Account__c.Id and nothing works.

Ideally when the user clicks on the button to reference the vf page I have created i want the report to filter on that specific account id that the button is on.

Any help is appreciated!

3

I've figured out that I just had to add ACCOUNT_ID as it is case sensitive:

filter="{column:'ACCOUNT_ID', operator: 'equals', value: '{!Id}'}"

That worked out!

0

For those who might face this issue. I have a similar issue, but my requirment was to filter on custom object and its relationship. like Inventory__c.case__r.recordtype. Inventory custom object have case lookup and want to filter on its record type. So when i write like this:

{column:'Inventory__c.case__r.recordtype', operator:'notEqual', value:''}

it says:

 Specify a valid filterable column

Its solution is this:

{column:'FK_CASE_RECORDTYPE', operator:'notEqual', value:''}

I was using inventory__c as standard controller on page and i get this solution from this post.

Embed report chart to visualforce filter issue

What actually happen is Salesforce has its own api names when you use them in filter which you can get by querying reports metadata.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.