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?

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 Sep 23 '16 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 Sep 23 '16 at 12:01
  • @fraglord Did that end up being what you were looking for? – Adrian Larson Sep 23 '16 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 Sep 24 '16 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 Sep 24 '16 at 5:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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