+ Start a Discussion
vasuroyvasuroy 

Custom Controller vf page

how do we add vf page with custom controllers  as a buttons  or link in  a detail pagelayout ,

 

Best Answer chosen by Admin (Salesforce Developers) 
amarcuteamarcute

A custom controller is a class written in Apex that implements all of a page's logic, without leveraging a standard controller. If you use a custom controller, you can define new navigation elements or behaviors, but you must also reimplement any functionality that was already provided in a standard controller. If you use a custom controller, you can define new navigation elements or behaviors, but you must also reimplement any functionality that was already provided in a standard controller.

 

You can use the Custom controller in several cases For Eg: onclick of a link you open a separate page & this page will have its own controls like edit, save etc... 

 

All Answers

amarcuteamarcute

Hi,

 

If you want to build a custom controller, follow the tutorial @ http://www.salesforce.com/us/developer/docs/pages/Content/pages_controller_custom.htm

or, if you want to build a controller extension, follow the tutorial @ http://www.salesforce.com/us/developer/docs/pages/Content/pages_controller_extension.htm

amarcuteamarcute

if you want to add it to the Details page of any of the Objects, You must use Standard Controller & Extensions on your visual force page. Once, you are done with your page, go to Setup --> Customize --> Object --> PageLayout --> Click on Edit  to edit the PageLayout

Click on VisualForce Pages. Drag & Drop a section into the Details page. Set Width & Height of the page. Drag & drop the page into the section.

vasuroyvasuroy

but where do we use the vf pages that we built with only custom controllers

amarcuteamarcute

A custom controller is a class written in Apex that implements all of a page's logic, without leveraging a standard controller. If you use a custom controller, you can define new navigation elements or behaviors, but you must also reimplement any functionality that was already provided in a standard controller. If you use a custom controller, you can define new navigation elements or behaviors, but you must also reimplement any functionality that was already provided in a standard controller.

 

You can use the Custom controller in several cases For Eg: onclick of a link you open a separate page & this page will have its own controls like edit, save etc... 

 

This was selected as the best answer
vasuroyvasuroy

thanks amar