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
Robert RobinsonRobert Robinson 

Filtering a related list

I have created a Visualforce Page to mimic a related list for a custom object (Properties). The purpose is to add a filter to filter out properties with a status (Status__c) = "Active". To this point, I have been able to mimic the related list section of the Account object using this code:
<apex:page sidebar="false" showHeader="true" StandardController="Account">
   <apex:relatedList list="Properties_Operated__r">
   </apex:relatedList>
</apex:page>
I have been able to add the Visualforce page as a section of the page layout; it looks good and functions perfectly. I am now trying to add the code to filter by Status__c = "Active". So far, my attempts have been unsuccessful. Could someone advise as to the proper coding to use? Thank you. 
Best Answer chosen by Robert Robinson
Robert RobinsonRobert Robinson
I saw this very same post by Doug; it was in the consideration of this approach that I took the Visualforce option. My code is very close; I just need to figure out how to build in the filter of Inactive users in VF code. Thanks. 

All Answers

RbnRbn
Hi Robert,

Please go through the below link which is almost similar to your requirement:

https://douglascayers.wordpress.com/2015/11/18/salesforce-filter-related-lists-without-code/

Do let me know if it helped you.Or else will help out looking for other solutions as well.

Rgrds,
Rabi
Robert RobinsonRobert Robinson
I saw this very same post by Doug; it was in the consideration of this approach that I took the Visualforce option. My code is very close; I just need to figure out how to build in the filter of Inactive users in VF code. Thanks. 
This was selected as the best answer
Susan Harris 6Susan Harris 6
In case you come across the need for this again, it is pretty easy with Lookup Helper (available free on the AppExchange (https://goo.gl/LvaVlk)). Check out my blog on tracking open Cases by Priority on Accounts and Contacts: https://www.passagetechnology.com/lookup-helper-use-cases/2016/7/8/tracking-open-cases-by-priority-on-accounts-and-contacts

Full disclosure, I work for Passage Technology - the makers of Lookup Helper.