You need to sign in to do that
Don't have an account?

Confused between Standard and custom controllers
Hi
I am confused with the following scenario
I am trying to develop a VF page that would be called from a standard object. The VF page itself would be for a custom object
So I have a button from which the new VF Page needs to be called. The new VF page layout should match that of salesforce standard layout.
What type of controller should I used for the above. I am new to the salesforce world so pardon my very basic question.
Thanks for taking a look at this.
Start off using the standard controller, as that gives you lots of functionality for free. Then if you need custom functionality, use an extension controller so that you still leverage the standard controller.
Custom controllers require you to write everything yourself, so I tend not to use these for pages unless there's a really good reason. Of course for custom components, you have to use a custom controller.
The Visualforce Developer's Guide has lots of information in chapters 4, 5 and 6 regarding controllers. If you are new to VF the quick start in chapter 2 is very useful.