1

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?

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

1 Answer 1

6

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

Check http://www.salesforce.com/us/developer/docs/pages/Content/pages_controller_sosc_list_views.htm 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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .