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

Using Custom Buttons to filter a related list

I have a custom object with a related list to another custom object.  At the moment the related list is showing all related records.  However, I would like to be able to press a button to see only a subset of the related list items.


So, for example, there is a picklist field on the related object called "Type of Plan" which contains 3 possible values.  I would like to be able to have 3 buttons in the related list section that I could press, each of which gives me the related list for value 1, value 2 and value 3.


I thought I could add a custom button and some code to do this but cannot figure out how to do it (without resorting to a new VF page...).  A review of forum posts hasn't revealed anything.


Any ideas would be greatly appreciated!





Best Answer chosen by Admin (Salesforce Developers) 


I think VF is going to be the only way you can get this done.  I have not found a native way to filter Related Lists.