function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
manish deshmukh 18manish deshmukh 18 

why would I use a custom controller when I can use the standard controller with extension?

Surender reddy SalukutiSurender reddy Salukuti
Hi in the certain criteria if you want to use both custom facilieties and standard facility we used extension but we can use only custom functionality s with visualforce page than we can use controller.


 
HARSHIL U PARIKHHARSHIL U PARIKH
I would point you towards this: https://developer.salesforce.com/forums/?id=9060G000000I3xFQAS




 
Deepali KulshresthaDeepali Kulshrestha
Hi manish,
You use a custom controller when you don't want standard functionality for your vf page and:
A. When a Visualforce page needs to replace the functionality of a standard controller. 
B. When a Visualforce page does not reference a single primary object. 
C. When a Visualforce page should not enforce permissions or field-level security. 
D. When a Visualforce page needs to add new actions to a standard controller. 

For better understanding go through the links below:
https://developer.salesforce.com/forums/?id=9060G000000I3xFQAS
http://sfdcsrini.blogspot.com/2015/03/standard-controller-extension-and.html

I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.

Thanks and Regards,
Deepali Kulshrestha