You need to sign in to do that
Don't have an account?
Narasimha L
-When should an Extension be used instead of a Custom Controller?
Hi Dev's
-When should an Extension be used instead of a Custom Controller?
Regards
Narasimha
-When should an Extension be used instead of a Custom Controller?
Regards
Narasimha
1) https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_controller.htm
2) https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_controller_def.htm
3) https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_controller_considerations.htm
4) https://www.lynda.com/Visualforce-tutorials/Understanding-standard-controllers-custom-controllers-extensions/172850/197247-4.html
5) http://www.slideshare.net/msabukwaik/custom-controllers-and-controller-extensions
What are Custom Controllers and Controller Extensions?
A custom controller is an Apex class that implements all of the logic for a page without leveraging a standard controller. Use custom controllers when you want your Visualforce page to run entirely in system mode, which does not enforce the permissions and field-level security of the current user.
A controller extension is an Apex class that extends the functionality of a standard or custom controller. Use controller extensions when:
All Answers
An extension controller is used when you want to have custom fucntion in the controller. As you would know salesforce works as a MVC. Model, view and controller. Each object created in salesforce has a standard controller with basic functions like save, cancel.
If you want to have a custom save methods or your own methods an extension class is used to achieve that
Hope it gives a basic idea
RD
1) https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_controller.htm
2) https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_controller_def.htm
3) https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_controller_considerations.htm
4) https://www.lynda.com/Visualforce-tutorials/Understanding-standard-controllers-custom-controllers-extensions/172850/197247-4.html
5) http://www.slideshare.net/msabukwaik/custom-controllers-and-controller-extensions
What are Custom Controllers and Controller Extensions?
A custom controller is an Apex class that implements all of the logic for a page without leveraging a standard controller. Use custom controllers when you want your Visualforce page to run entirely in system mode, which does not enforce the permissions and field-level security of the current user.
A controller extension is an Apex class that extends the functionality of a standard or custom controller. Use controller extensions when: