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
Akhil R NathAkhil R Nath 

Hi, I want to display Account, Contact, Lead, Opportunity in visualforce page and I need to add a filter condition in visualforce page to filter the Objects.. Could anyone help?

ShirishaShirisha (Salesforce Developers) 
Hi Akhil,

Greetings!

Since you are trying to display the related Object,you can directly create the Visualforce page on the Account Object and try to call the related Objects like Contact,Lead and Opportunity Objects.

Also,if you would like to add filter on which you would like to display then you will need the Extension where you can query the related records and display on the Page.

Reference:https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_controller_extension.htm

Kindly let me know if it helps you and close your query by marking it as best answer so that it can help others in the future.

Warm Regards,
Shirisha Pathuri