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

How to create the visualforce page, to display all the records



I need to create the visualforce page that should display all the records based on the lookup field value selected. Plese guide me.




Best Answer chosen by Admin (Salesforce Developers) 

All Answers


Hi Ankit,


i would've wrongly posted the code twice..shall take care in future.. :)


however, my requirement is something like that I need to display all the records having same lookup value in the another visualforce page.


the scenario is something like:


i have a custom object "A", on this page layout i have two lookup field i.e. Lookup field 'x' and Lookup field 'y'. The values of lookup field Y is dependent on the value of Lookup field 'x'. As the user select the value for Lookup field 'x', then all the values of related to it should get displayed in the VF page.


to fulfill this requirement i can create the dependent lookup filter, but it has one problem it doesn't show all records based on the dependent field. I have to search for it.


So, i am looking for to create a page where i can display all the records tat are related to Lookup field 'x'. please suggest how can i do that.