Salesforce dev-501 practice test

Exam Title: Apex and Visualforce Controllers

Last update: Nov 27 ,2025
Question 1

A message for a specific component, such as a warning or error. If an <apex:message> or
<apex:messages> component is not included in a page, most warning and error messages are only
shown in the debug log.

  • A. apex:message
  • B. apex:flash
  • C. apex:detail
  • D. apex:listViews
Answer:

A

vote your answer:
A
B
C
D
A 0 B 0 C 0 D 0
Comments
Question 2

A component that provides support for invoking controller action methods directly from JavaScript
code using an AJAX request. An <apex:actionFunction> component must be a child of an <apex:form>
component.

  • A. apex:messages
  • B. apex:actionFunction
  • C. apex:insert
  • D. apex:outputField
Answer:

B

vote your answer:
A
B
C
D
A 0 B 0 C 0 D 0
Comments
Question 3

An HTML input element of type checkbox. Use this component to get user input for a controller
method that does not correspond to a field on a Salesforce object.

  • A. apex:dataList
  • B. apex:inputCheckbox
  • C. apex:actionPoller
  • D. apex:componentBody
Answer:

B

vote your answer:
A
B
C
D
A 0 B 0 C 0 D 0
Comments
Question 4

The list view picklist for an object, including its associated list of records for the currently selected
view. In standard Salesforce applications this component is displayed on the main tab for a particular
object.
See also: <apex:enhancedList>.

  • A. apex:actionStatus
  • B. apex:listViews
  • C. apex:inputText
  • D. apex:pageBlockButtons
Answer:

B

vote your answer:
A
B
C
D
A 0 B 0 C 0 D 0
Comments
Question 5

A read-only display of a label and value for a field on a Salesforce object. An <apex:outputField>
component respects the attributes of the associated field, including how it should be displayed to the
user. For example, if the specified <apex:outputField> component is a currency field, the appropriate
currency symbol is displayed. Likewise, if the <apex:outputField> component is a lookup field or URL,
the value of the field is displayed as a link.
Note that if custom help is defined for the field in Setup, the field must be a child of an
<apex:pageBlock> or <apex:pageBlockSectionItem>, and the Salesforce page header must be
displayed for the custom help to appear on your Visualforce page. To override the display of custom
help, use the <apex:outputField> in the body of an <apex:pageBlockSectionItem>.
The Rich Text Area data type can only be used with this component on pages running Salesforce.com
API versions greater than 18.0.

  • A. apex:actionRegion
  • B. apex:actionSupport
  • C. apex:outputField
  • D. apex:pageBlock
Answer:

C

vote your answer:
A
B
C
D
A 0 B 0 C 0 D 0
Comments
Question 6

A component that creates an input field to upload a file.
Note: The maximum file size that can be uploaded via Visualforce is 10 MB.

  • A. apex:barSeries
  • B. apex:inputFile
  • C. apex:composition
  • D. apex:legend
Answer:

B

vote your answer:
A
B
C
D
A 0 B 0 C 0 D 0
Comments
Question 7

This tag allows a custom component author to define a location where a user can insert content into
the custom component. This is especially useful for generating custom iteration components. This
component is valid only within an <apex:component> tag, and only a single definition per custom
component is allowed.

  • A. apex:facet
  • B. apex:chart
  • C. apex:include
  • D. apex:componentBody
Answer:

D

vote your answer:
A
B
C
D
A 0 B 0 C 0 D 0
Comments
Question 8

An HTML input element of type text. Use this component to get user input for a controller method
that does not correspond to a field on a Salesforce object.
This component does not use Salesforce styling. Also, since it does not correspond to a field, or any
other data on an object, custom code is required to use the value the user inputs.

  • A. apex:messages
  • B. apex:dynamicComponent
  • C. apex:inputText
  • D. apex:inputField
Answer:

C

vote your answer:
A
B
C
D
A 0 B 0 C 0 D 0
Comments
Question 9

A custom Visualforce component. All custom component definitions must be wrapped inside a single
<apex:component> tag.

  • A. apex:includeScript
  • B. apex:commandLink
  • C. apex:dataTable
  • D. apex:component
Answer:

D

vote your answer:
A
B
C
D
A 0 B 0 C 0 D 0
Comments
Question 10

A Visualforce chart. Defines general characteristics of the chart, including size and data binding.

  • A. apex:actionSupport
  • B. apex:inlineEditSupport
  • C. apex:chart
  • D. apex:enhancedList
Answer:

C

vote your answer:
A
B
C
D
A 0 B 0 C 0 D 0
Comments
Page 1 out of 18
Viewing questions 1-10 out of 186
Go To
page 2