Take the 2-minute tour ×
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.

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 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? –  sfdc_ninja Feb 4 at 21:53
    
only have 8 instances. I want a tab in Salesforce1 that shows all the instances –  user5428 Feb 4 at 21:55
add comment

1 Answer 1

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.

share|improve this answer
add comment

Your Answer

 
discard

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.