Today's Offer - Salesforce Certification Training - Enroll at Flat 10% Off.

- Salesforce Blogs -

What is Standard Controller in Salesforce?

Salesforce is one of the easiest, yet one of the trickiest technologies available in the market today. This is simply because in the back end it does deal with a few things that necessarily need a technical skill set to accomplish the tasks at hand. One such tricky thing to comprehend is the concept of Standard Controllers in Salesforce.

Today we would discuss what is Salesforce standard controller? To understand the topic at hand better, we have divided the blog into the following parts- 

What is a Standard Controller?

Visualforce utilizes the conventional model– view– controller (MVC)paradigm and incorporates refined inherent controllers to deal with standard activities and information access handles, furnishing basic and tight integration with the Lightning Platform database. These implicit controllers are referred to by and large as standard controllers, or even the standard controller.

Read: What is Salesforce Architecture? Tutorial Guide for Beginners

The MVC configuration design makes it simple to isolate the view and its styling from the basic database and rationale. In MVC, the view (the Visualforce page) associates with a controller, and the controller gives usefulness to the page. For instance, the controller can contain the rationale to be executed when a link is clicked. A controller likewise regularly associates with the model (the database)— making available the information that the view s needs to show, or driving changes back to the database. salesforce Curriculum Most of the standard and every custom object have standard controllers that can be utilized to collaborate with the information related to the question, so you don't have to compose the code for the controller yourself. You can stretch out the standard controllers to include new usefulness, or make custom controllers without any preparation.

What Does a Standard Controller Do?

The collaboration between a client and their business information can be straight forward or complex, yet in any case, it requires a point by point set of guidelines and standards to be overseen. The controller is the object that gives such an administration while saving a perfect detachment between the view layer and the information model.

In the MVC design, Views know how to show their information and acknowledge the contribution from the client, however, they may know nothing about how to really bring that information or process it. Information Models know how to perform different tasks, for example, Save, Delete or Merge, however, should be advised when to work, and should be furnished with the requisite information to work on.

Read: What are Salesforce Objects? Top 4 Salesforce Standard Objects

It is the Controller’s job to marshal both data and action selection, as initiated by the user from within the View, to the Model. Controllers are also responsible for responding accordingly with navigation redirection based on the results of any particular action. In the Salesforce MVC paradigm, it is the standard controller that facilitates the ability of users to access and interact with the structured business data contained in records and displayed in the materialized user interface. salesforce quiz It is the Controller's business to marshal both the information and the activity choice, as stated by the client from inside the View, to the Model. Controllers are additionally in charge of reacting appropriately with route redirection in view of the consequences of a specific activity. In the Salesforce MVC worldview, it is the standard controller that encourages the capacity of clients to get to and communicate with the organized business information contained in records and displayed in the appearing UI.

A standard controller's main tasks are as follows:

  • Controlling Data: Standard controllers bring information and give it to the page, list, discourse or shape, all are referred to as perspectives. While it is the view's task to deal with the introduction of its information, the controller accumulates the information from the view as entered or changed by a client, and passes it to the information demonstrated for handling.
  • Controlling Actions: Standard controllers react to the client or automatic orders started from a view. Such summons, generally referred to as Actions, may be related with handling the information accumulated from the view, or essentially to react to a navigational link.
  • Controlling Navigation: Standard controllers navigate the client to a particular view related to an activity. They likewise handle redirection to resulting views, in light of the particular result of different activities and information tasks.

Developers may expect that they should turn to the usage of custom Apex rationale to give complex usefulness that their applications require, yet may be ignorant about the fact that such use may as of now be accessible to them in Visualforce by means of standard controller components. free salesforce demo It is a best practice to ensure that you comprehend what is accessible to use in the standard controller layer before you start to outline and manufacture your own particular custom pages and controllers to abstain from 'reinventing the wheel.'

Standard Controller Methods

Read: How to Get Certified as a Salesforce Professional and Verify the Certification

Standard Controller Methods

The accompanying are methods for Standard Controller. All are instance methods-

  • addFields(fieldNames) - At the point when a Visualforce page is loaded, the fields available to the page depending on the fields referenced in the Visualforce mark-up. This method adds a reference to each field indicated in fieldNames with the goal that the controller can unequivocally get to those fields too.
  • cancel() - Returns the Page Reference of the drop page.
  • delete() - Erases records and returns the Page Reference of the erased page.
  • edit() - Returns the Page Reference of the standard alter page.
  • getRecord() - Returns the record that is currently in setting, in view of the estimation of the id inquiry string parameter in the Visualforce page URL.
  • reset() - Powers the controller to reacquire access to recently referenced fields. Any progressions made to the record before this strategy call is disposed of automatically.
  • save() - Saves changes and returns the refreshed Page Reference.
  • view() - Returns the Page Reference object of the standard detail page.

Conclusion

I believe by now it is clear that Standard Controller in Salesforce is of great use provided you know how to use it properly. It can easily save you a lot of trouble and coding as can be seen from the uses of the standard controller portion of this blog. I am sure that using the Standard Controllers can easily increase your efficiency on the Salesforce system.

Read: Execution Rules of Salesforce Triggers

Salesforce Tutorial Overview


    Janbask Training

    JanBask Training is a leading Global Online Training Provider through Live Sessions. The Live classes provide a blended approach of hands on experience along with theoretical knowledge which is driven by certified professionals.


Trending Courses

AWS

  • AWS & Fundamentals of Linux
  • Amazon Simple Storage Service
  • Elastic Compute Cloud
  • Databases Overview & Amazon Route 53

Upcoming Class

1 day 14 Nov 2019

DevOps

  • Intro to DevOps
  • GIT and Maven
  • Jenkins & Ansible
  • Docker and Cloud Computing

Upcoming Class

2 days 15 Nov 2019

Data Science

  • Data Science Introduction
  • Hadoop and Spark Overview
  • Python & Intro to R Programming
  • Machine Learning

Upcoming Class

2 days 15 Nov 2019

Hadoop

  • Architecture, HDFS & MapReduce
  • Unix Shell & Apache Pig Installation
  • HIVE Installation & User-Defined Functions
  • SQOOP & Hbase Installation

Upcoming Class

3 days 16 Nov 2019

Salesforce

  • Salesforce Configuration Introduction
  • Security & Automation Process
  • Sales & Service Cloud
  • Apex Programming, SOQL & SOSL

Upcoming Class

1 day 14 Nov 2019

QA

  • Introduction and Software Testing
  • Software Test Life Cycle
  • Automation Testing and API Testing
  • Selenium framework development using Testing

Upcoming Class

-1 day 12 Nov 2019

Business Analyst

  • BA & Stakeholders Overview
  • BPMN, Requirement Elicitation
  • BA Tools & Design Documents
  • Enterprise Analysis, Agile & Scrum

Upcoming Class

2 days 15 Nov 2019

SQL Server

  • Introduction & Database Query
  • Programming, Indexes & System Functions
  • SSIS Package Development Procedures
  • SSRS Report Design

Upcoming Class

6 days 19 Nov 2019

Comments

Search Posts

Reset

Receive Latest Materials and Offers on Salesforce Course

Interviews