24 September, 2018


Related Blogs

Controllers in Salesforce

Using S.Control's for UI (User Interface) The tool that allows application developers to display custom links (HTML) in a detail page or custom tab, this provides more flexibility for the fields and page layouts. But

  • Executes from within a browser, causing poor performance if displaying or updating values for more than a few records at a time.
  • Do not provide an easy way to give custom UI elements the same look-and-feel as standard SF pages.
  • Require developer to enforce field uniqueness and other metadata dependencies on their own.

Note: S.control's are suppressed by VF pages (Visual Force).After March 2010 organizations that have never created S.Control's as well as new organizations, won't be allowed to create them Existing S.Control's will remain and can still be edited. These are the reasons why VF pages came in to existence; these are next generation solutions for building sophisticated user interfaces on the platform.

What is Visulal Force?

VF is a frame work that allows developers to build sophisticated, custom user interfaces that can be hosted natively on the platform. This includes a tag based markup language, similar to HTML. In VF markup language each VF tag corresponds to a coarse or fine-gained users interface components such as

  • Section of page
  • A related list or a field

The behavior of VF components can be controlled by the same logic that is used in standard SF pages, or developer can associated their own logic with a controller class written in APEX.

Inclined to build a profession as Salesforce APEX Developer? Then here is the blog post on 
Salesforce Training and Certification.


Tag in VF are <apex:page>
 <apex:page Block>
 <apex:page Block Buttons>
 <apex: page Block section>
 ` <apex:page Block section Item>
 <apex:page Block Table> ------> Tags related to a page tags

Input field tags:

<apex:input File>
<apex:input text >
<apex:input text area>

Select tags:

<apex:Selection list>
<apex:select options>
<apex:select Radio>

Output field Tags:

<apex:output Field>
 <apex:output label>
 <apex:output link>
 <apex:output pannel>
 <apex:output text>

Like this there are around 90 tags in VF and each tag full fills request such as defining a page, page block field, toolbar these tags can be divided into

  • Input tags
  • Output tags
  • Select tags
  • Form tags
  • Page tags and so on…

Using these tags developers can create a VF page definition. It consists of two primary elements. VF Markup ---> AVF ---> Controller

VF Markup:

Visual force Markup consists of VF tags, HTML, JavaScript and many other web-enabled code embedded within a single <apex: page>tag. This defines the user interface components that should be include on the pages, and the way they should appear.

VF Controllers:

VF controller is a set of instructions that specifies what happens when a user interacts with UI components specified by VF markup, (such as when user clicks on the button on link).controller also provides access to the data that should be displayed on the page, and can modify component behavior.

A developer can use a standard controller consists of the same functionality and logic that is used for a standard salesforce page.

Note: If we use the standard Account controller, clicking a save button in VF page results in same behavior as clicking save button on Account edit page Using page layouts, we cannot have access to the objects in standard field, and display's an error called as insufficient privileges error message, we can avoid this by checking the user's accessibility for an object and displaying component approximately.

  • A standard list controller enables us to create VF pages that can display an act on a set of records like list pages, related lists, and mass action pages.
  • Custom controller: it’s a class written in Apex that implements all page's logic, without leveraging a standard controller, if we define this, we have to define new navigation elements or behaviors, but we must implement any functionality that was already provided in a standard controller.
  • Controller extension: class written in Apex that adds to or overrides behavior in a standard or custom controller.

Extensions allow us to leverage the functionality of another controller while adding your own logic. Visual Pages Force can be used: Developer can use VF pages to

  • Override standard buttons, such as NEW button for accounts, save button for contacts.....
  • Define custom tab.
  • Embed components in detail page layout.
  • Create dashboard components on custom help pages.
  • Customize, extend on integrate the sideboards in the services cloud console (custom console components)

For indepth understanding on Salesforce click on

About Author


Author Bio

TekSlate is the best online training provider in delivering world-class IT skills to individuals and corporates from all parts of the globe. We are proven experts in accumulating every need of an IT skills upgrade aspirant and have delivered excellent services. We aim to bring you all the essentials to learn and master new technologies in the market with our articles, blogs, and videos. Build your career success with us, enhancing most in-demand skills .