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.
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.
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