nerdexam
Salesforce

PDI · Question #4

A developer Is asked to create a Visualforce page that lists the contacts owned by the current user. This component will be embedded In a Lightning page. Without writing unnecessary code, which…

The correct answer is B. Standard controller. The developer needs a Visualforce page to list contacts owned by the current user, to be embedded in a Lightning page, without writing unnecessary custom code.

Submitted by layla.eg· Apr 18, 2026User Interface

Question

A developer Is asked to create a Visualforce page that lists the contacts owned by the current user. This component will be embedded In a Lightning page. Without writing unnecessary code, which controller should be used for this purpose?

Options

  • AStandard list controller
  • BStandard controller
  • CLightning controller
  • DCustom controller

How the community answered

(40 responses)
  • A
    10% (4)
  • B
    83% (33)
  • C
    5% (2)
  • D
    3% (1)

Why each option

The developer needs a Visualforce page to list contacts owned by the current user, to be embedded in a Lightning page, without writing unnecessary custom code.

AStandard list controller

A 'Standard list controller' (i.e., `StandardSetController`) typically requires custom Apex code to implement dynamic filtering like 'owned by the current user' unless a specific list view is referenced, which goes against the 'without writing unnecessary code' constraint.

BStandard controllerCorrect

A Visualforce page can use a standard controller for the User object and then leverage the `<apex:relatedList>` component to display contact records where the User is the owner, effectively listing contacts owned by the current user without custom Apex code.

CLightning controller

A Lightning controller is used for Lightning Web Components or Aura Components, not for Visualforce pages.

DCustom controller

A custom controller would require writing Apex code to query and filter the contacts, which the question explicitly seeks to avoid.

Concept tested: Visualforce Standard Controller with Related Lists

Source: https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_standard_controller_about.htm

Topics

#Visualforce#Standard Controller#Related Lists#Lightning Pages

Community Discussion

No community discussion yet for this question.

Full PDI Practice