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
BussBuss 

Condition on related list of visual force

Hi all,

 

any help is appreciation.

 

i have picklist status__c on contact object contains values "Active" and "In Active", so i want to display only active contacts on Account detail page.

 

i tried with below statement, it's showing error:

 

<apex:relatedList list="Contacts" title="Contacts" rendered="{!IF(ISPICKVAL(account.Contacts.status__c,'Active'), true, false)}" />

 

error:

Unknown property 'VisualforceArrayList.status__c'

 

Rds,

Buss


sfdcfoxsfdcfox

You can't add filters this way. Assuming it did work, it would only render either the entire list, or none of the list (it wouldn't render at all). You'll have to build your own pageblock->pageblocktable->etc.