What is the difference between a standard controller and a custom controller?

Asked By: Erna Elkoro | Last Updated: 18th April, 2020
Category: technology and computing browsers
4.9/5 (506 Views . 9 Votes)
Custom Controller:
It is an Apex class that implements all of the logic for a page without leveraging a standard controller. Custom Controllers are associated with Visualforce pages through the controller attribute. Custom controller defines its own functionality.

Click to see full answer


Likewise, what is the difference between custom controller and extension?

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.

Secondly, what is a controller in Salesforce? Standard Controllers. A Visualforce controller is a set of instructions that specify what happens when a user interacts with the components specified in associated Visualforce markup, such as when a user clicks a button or link.

People also ask, what are different types of controllers in Salesforce?

what are differnt types of controllers in salesforce

  • Apex Code Development (78177)
  • Lightning (10827)
  • Trailhead (10115)
  • Security (2675)
  • Perl, PHP, Python & Ruby Development (1984)
  • Chatter and Chatter API Development (1645)
  • Salesforce Labs & Open Source Projects (1137)
  • Desktop Integration (1097)

Can standard controller be used for custom objects?

Standard Controllers. A StandardController object that is automatically provided for standard and all custom objects, bindable to a Visualforce page component with the “standardController” attribute. It provides a reference to a single/list of record to a set of common actions for data processing and default navigation

29 Related Question Answers Found

What is StandardSetController why we use it?

StandardSetController Class. StandardSetController objects allow you to create list controllers similar to, or as extensions of, the pre-built Visualforce list controllers provided by Salesforce.

How do I override a standard controller in Salesforce?

Steps to overriding standard buttons
Go to setup -> opportunity -> Buttons,links, and actions, then click edit on new action. see below image for reference. Next select override with visualforce option and select “newopportunitycreatepage” you created above and save your changes.

What is Ajax in Salesforce?

AJAX is the art of exchanging data between server and client without reloading the complete web page. Visualforce and AJAX. Visualforce has inbuilt support for the AJAX.

How do I use a custom controller in Visualforce page?

Create a Visualforce Page that Uses a Custom Controller
Add a custom controller to a Visualforce page by referencing the name of the controller class in the <apex:page> controller attribute. When your page uses a custom controller, you can't use a standard controller.

What is Apex controller?


The Apex Controller is by far one of the most advanced dedicated aquarium controllers on the market today. The wide variety of controllability with the Apex Controller System and its easy to use cloud interface makes it a perfect option for a fully automated reef tank.

What is pagination in salesforce?

Pagination is the process of taking a complete document or a large number of records in this example and breaking that document/large number of records into separate pages for viewing within the Salesforce. The Salesforce user can click the next tab and go through each new page display the next 10 records.

What is System mode and user mode in Salesforce?

Definition. User Mode - Profile level permissions, field-level security, and sharing rules of the current user are enforced. System Mode - Object permissions, field-level security, sharing rules aren't applied for the current user.

What is an apex constructor?

A constructor is code that is invoked when an object is created from the class blueprint. In Apex, a constructor can be overloaded , that is, there can be more than one constructor for a class, each having different parameters.

What is standard list controller in Salesforce?

Standard List Controllers. Standard list controllers allow you to create Visualforce pages that can display or act on a set of records. Examples of existing Salesforce pages that work with a set of records include list pages, related lists, and mass action pages.

What is standard set controller in Salesforce?


StandardSetController allows us to create list controllers similar to, or as extensions of, the pre-built Visualforce list controllers provided by Salesforce. For e.g when you want to override a tab or list view with your custom visualforce page like.

What are extensions in Salesforce?

Controller extension in Salesforce is an Apex class containing a constructor that is used to add or extend the functionalities of a Standard Controller or custom controller in Salesforce. Extension controller is also used to leverage the functionality of another controller using our own custom logic.

What is Aura framework in Salesforce?

Aura is a framework for developing apps for mobile and desktop devices. In existence since 2013, Aura enables developers to build apps that are independent of data that resides in Salesforce, so development can be less disruptive to day-to-day users.

How do I use Visualforce in Salesforce?

Follow these steps to create a Visualforce page in the Developer Console.
  1. Open the Developer Console under Your Name or the quick access menu ( ).
  2. Click File | New | Visualforce Page.
  3. Enter HelloWorld for the name of the new page, and click OK.
  4. In the editor, enter the following markup for the page.
  5. Click File | Save.

What are Salesforce custom settings?

Custom settings are similar to custom objects and enable application developers to create custom sets of data, as well as create and associate custom data for an organization, profile, or specific user. This data can then be used by formula fields, validation rules, flows, Apex, and the SOAP API.

What is the requirement for a class to be used as a custom Visualforce controller?


  • Any top-level Apex class that has a default, no-argument constructor. Share.
  • Any top-level Apex class that has a default, no-argument constructor.
  • Any top-level Apex class that implements the controller interface.

How do I create a Salesforce extension?

Step 1: Extend the Data Model
  1. In Setup, select Build > Create > Objects, and click the Speaker link.
  2. In the Custom Fields & Relationships section, click New, and create a Picture_Path field defined as follows: Data Type: Text. Field Label: Picture Path.
  3. Create a Picture field defined as follows: Data Type: Formula.

What is recordSetVar in Salesforce?

recordSetVar tag in Visualforce Page. recordSetVar attribute in Visual force page: The value of the attribute indicates name of the set of records passed to the page means collection records. This record set can be used in the expressions to return values for display on the page or to perform actions on set of records.