0

Right now, I have a custom object Errol__c. It has its own custom tab.

I wish to make a Visualforce Page that will look exactly the same as when I press the custom object tab.

That is, there should be the icon, name of object, list view list and buttons and the table with all the records.

I know something like this can be done with a standard object/controller, however, what about custom objects/controllers?

1 Answer 1

3

You don't even need any controller. The <apex:enhancedList> tag gives you a very similar view to the out of the box object tab. You can also set the tabStyle attribute.

<apex:page tabStyle="MyObject__c">
    <apex:enhancedList type="MyObject__c" height="300" rowsPerPage="10" />
</apex:page>

Enhanced List

6
  • Ok this is somewhat similar to what I require. Can it show the default list view (the one you get when you click a tab?)
    – fraglord
    Commented Sep 23, 2016 at 12:01
  • I think it will show the most recent list view you have visited. Whatever the default behavior is, you certainly cannot control that aspect.
    – Adrian Larson
    Commented Sep 23, 2016 at 12:01
  • @fraglord Did that end up being what you were looking for?
    – Adrian Larson
    Commented Sep 23, 2016 at 23:18
  • Somewhat :) For now, I'll mark the question as answered, since it is the "correct" answer for the question, but I have decided to do something else.
    – fraglord
    Commented Sep 24, 2016 at 4:59
  • for now, I just want to replace the default "New" button inner workings so that it displays a VF page instead of the default SF new record screen.
    – fraglord
    Commented Sep 24, 2016 at 5:00

You must log in to answer this question.

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