Salesforce - List Controllers


Advertisements

In this chapter, we will discuss List Controllers in Salesforce. At times, we need to view a given set of records from a Salesforce object by applying filter criteria. This is achieved by using list controllers which allow you to create Visualforce pages that can display or act on a set of records. The standard list controllers can be used in the following set of objects.

  • Account
  • Asset
  • Campaign
  • Case
  • Contact
  • Contract
  • Idea
  • Lead
  • Opportunity
  • Order
  • Solution
  • User
  • Custom objects

Example

We take the example of contact object. We fetch the records from this object and display it using list controllers. To achieve this, we create an apex page with the following code. The code creates a pageblock with column values matching the column names of the contact object.

vf list controllers

Upon running the above code, we receive the following output.

vf list controllers result

Useful Video Courses


Video

Salesforce Online Training

49 Lectures 3.5 hours

Manigandan Jagadeesan

Video

Salesforce Certified Administration

113 Lectures 13 hours

Eduonix Learning Solutions

Video

A Practical Guide To SFDX and Salesforce CLI

37 Lectures 3 hours

Manish Choudhari

Video

Cloud Computing with SALESFORCE HEROKU

22 Lectures 4.5 hours

Pranjal Srivastava

Video

Salesforce Report and Dashboard

43 Lectures 7 hours

Debasis Jena

Video

Salesforce Lightning Components Development Tutorial

54 Lectures 8 hours

SYED CHAND SHAH

Advertisements