Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a custom object called Projects. How do I create a VF page that shows all of the instances of that object?

Do I need a custom apex controller querying the database and if so what would that look like?

share|improve this question
How many records do you have? There are limits to how many records can be returned. – Mike Chale Feb 4 '14 at 21:52
Agree with @Mike Chale. Also, is there a reason a list view would not suffice? Do you have a tab for this object? – Chris Duncombe Feb 4 '14 at 21:53
only have 8 instances. I want a tab in Salesforce1 that shows all the instances – user5428 Feb 4 '14 at 21:55

You should have a look at StandardSetController and any Visualforce examples that contain the recordSetVar in them.

Check for example.

By default you can achieve a list with 20 records and previous/next controls that will let you paginate through it. Anything more like more rows per page - you'd need an Apex controller extension or completely custom controller. Similar to Displaying more rows

With page annotated as <apex:page readonly="true"> you'll be able to go up to 10,000 records.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.