Salesforce DEV-501 Apex Visualforce Controller Practice Exam Set 8

What is NOT a component of a custom Force.com application?


Options are :

  • Custom tab
  • Default landing tab
  • Custom object
  • Data warehouse (Correct)

Answer : Data warehouse

Universal Containers requires that some employees are able to view and edit records of a custom object called Positions, but no users can delete them. How can Universal Containers accomplish this goal?


Options are :

  • Assign the Read-only profile to all users
  • Set the organization wide default for positions to Read-only
  • Remove the Delete Access for positions from all user roles
  • Remove the Delete permission for positions from all profiles (Correct)

Answer : Remove the Delete permission for positions from all profiles

Which trigger context variable allows you to modify field values before they are written to the database in the before trigger?


Options are :

  • @ReadOnly
  • RETURNING
  • Webservice
  • Trigger.new (Correct)

Answer : Trigger.new

Which statement is true regarding Force.com Sites? Choose 3 answers


Options are :

  • Sites can leverage declarative page layouts as web pages.
  • Sites leverage data and content in a Salesforce org.
  • B,C,D (Correct)
  • Sites enables developers to build public, unauthenticated websites.
  • Sites are built with Visualforce pages.

Answer : B,C,D

This component provides inline editing support to <apex:outputField> and various container components. In order to support inline editing, this component must also be within an <apex:form> tag. The  <apex:inlineEditSupport> component can only be a descendant of the following tags: <apex:dataList>  <apex:dataTable>    <apex:form>   <apex:outputField>  <apex:pageBlock> <apex:pageBlockSection> <apex:pageBlockTable> <apex:repeat>   See also: the inlineEdit attribute of <apex:detail>


Options are :

  • apex:chartLabel
  • apex:outputPanel
  • apex:inlineEditSupport (Correct)
  • apex:page

Answer : apex:inlineEditSupport

For example, if you use the standard Accounts controller, clicking a Save button in a Visualforce page results in the same behavior as clicking Save on a standard Account edit page. The same behavior holds true for Custom objects.


Options are :

  • False
  • True (Correct)

Answer : True

What provides access to data that should be displayed in a Visualforce page, and can modify Visualforce component behavior?


Options are :

  • Apex controller
  • None of the above
  • Force.com IDE
  • Visualforce controller (Correct)
  • Validation rules
  • MVC controller class

Answer : Visualforce controller

The System.runAs() functionality can be used to test and verify proper data sharing and data access. However, System.runAs() does NOT validate CRUD or Field Level Security permissions.


Options are :

  • False (Correct)
  • True

Answer : False

Which statement is TRUE about master-detail relationships in the Force.com platform?  Choose 2 answers


Options are :

  • When defining a master-detail relationship, the custom object on which you are working is the master.
  • When a master record is deleted, the child records remain in the system without a master record.
  • The security settings for the master record control the detail record. (Correct)
  • The master-detail relationship field is required on the page layout of the detail record.

Answer : The security settings for the master record control the detail record.

A placeholder for content that is rendered in a specific part of the parent component, such as the header or footer of an <apex:dataTable>. An <apex:facet> component can only exist in the body of a parent component if the parent supports facets. The name of the facet component must match one of the pre-defined facet names on the parent component. This name determines where the content of the facet component is rendered. Consequently, the order in which a facet component is defined within the body of a parent component does not affect the appearence of the parent component. See <apex:dataTable> for an example of facets. Note: Although you can't represent an <apex:facet> directly in Apex, you can specify it on a dynamic component that has the facet. For example:


Options are :

  • apex:inputField
  • apex:dataList
  • apex:logCallPublisher
  • apex:facet (Correct)

Answer : apex:facet

A developer would like to enable end users to filter the data displayed on the related list of  an object detail page. How could a developer accomplish this?


Options are :

  • Create a Visualforce page to replace the object detail view
  • Enable Advanced Search on the object's related list
  • Configure the object's related list to add a filter
  • Customize the search filter fields layout for that object (Correct)

Answer : Customize the search filter fields layout for that object

This Apex class allows developers to reference an instantiation of a page.


Options are :

  • PageReference Class (Correct)
  • URLReference Class
  • PageURLReference Class
  • None of the above
  • VisualforcePage Class
  • ExistingPage Class

Answer : PageReference Class

A label for an input or output field. Use this component to provide a label for a controller method that does not correspond to a field on a Salesforce object.


Options are :

  • apex:insert
  • apex:column
  • apex:inlineEditSupport
  • apex:outputLabel (Correct)

Answer : apex:outputLabel

What is the this keyword used to represent?


Options are :

  • A template from which objects are created
  • Salesforce ui, force.com ide, runTests web service
  • Methods and attributes of the current instance of a class (Correct)
  • HTTPRequest, HTTPResponse, HTTP

Answer : Methods and attributes of the current instance of a class

Objects of this Apex class specify one of the possible values for a Visualforce  selectCheckboxes, selectList, or selectRadio component.


Options are :

  • InputOption Class
  • Select Class
  • OptionSelection Class
  • None of the above
  • InputSelection Class
  • SelectOption Class (Correct)

Answer : SelectOption Class

Which statement is true about an Apex class?   ? A class cannot be disabled for profiles.  ? An inner class can be nested at multiple levels.  ? Static methods can only be declared in a top-level class definition.  ? The default access modifier for methods in a class is public.


Options are :

  • Salesforce-generated email address
  • Make calls to methods using both valid and invalid inputs.
  • Static methods can only be declared in a top-level class definition. (Correct)
  • Manual sharing, apex sharing

Answer : Static methods can only be declared in a top-level class definition.

What are the five types of Apex procedural loops? (No Answer)


Options are :

  • Create complex functionality declarative features cannot provide.
  • In, like, and, or, not, group by, order by, all rows, limit
  • Develop, integrate, stage, production/training
  • Do-while loop, traditional for loop, list or set iteration loops, and soql for loops (Correct)

Answer : Do-while loop, traditional for loop, list or set iteration loops, and soql for loops

A user can only see the fields A, B, and C on a record of Object X until the Stage field  value on the record changes from New to Working. Once the Stage field value is updated   to Working and the record is saved, the user should be able to see fields A, B, C, and D.  How would an application  developer configure this?


Options are :

  • Use multiple Visualforce pages (Correct)
  • Use validation rules to expose the field
  • Use workflow to change the record type
  • Use workflow to change the field-level security

Answer : Use multiple Visualforce pages

Which mechanism allows for authenticated access to a Force.com Site? Choose 2 answers


Options are :

  • An active Customer Portal (Correct)
  • It is not possible to provide authentication for a Force.com Site
  • Setting restricted IP ranges for your site
  • An active Partner Portal

Answer : An active Customer Portal

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.


Options are :

  • apex:legend
  • apex:composition
  • apex:inputFile (Correct)
  • apex:barSeries

Answer : apex:inputFile

Which of the following code will u use to instantiate a map called numbers that has integers as keys and strings as values?

? Map<SLrng, :nLeger> numbers = new Map<String, Integer>;

? Map<ThLeyer, SLring> numbers = new Map<Integer, String>;

? Map<nLeger> numbers = new Map<String>;

? Map<Slring> numbers = new Map<Integer>;


Options are :

  • Code contained in a trigger
  • Failure response settings
  • Map<Integer, String> numbers = new Map<Integer, String>; (Correct)
  • Manual sharing, apex sharing

Answer : Map<Integer, String> numbers = new Map<Integer, String>;

What is the size of the batches in which triggers execute?


Options are :

  • Java
  • FALSE
  • 200 (Correct)
  • NO

Answer : 200

Which of the following are collection data types Identify the classes that u can use to make  HTTP or RESTful callouts.  ? HTTP class   ? HTTPRequesL class  ?                  HTTPServerRequest. class   ? HTTPRsponse class  ? HTTPServerResponse class


Options are :

  • Apex code, Visualforce pages, and controllers
  • Logs, anonymous blocks
  • Apex classes
  • HTTP class, HTTPRequesL class, HTTPRsponse class (Correct)

Answer : HTTP class, HTTPRequesL class, HTTPRsponse class

What two ways can classes be created in salesforce? (No Answer)


Options are :

  • Through UI, Force.com IDE project (Correct)
  • isSuccess, sendEmailError
  • Bounced, discarded, queued
  • Apex, Visualforce, and APIs

Answer : Through UI, Force.com IDE project

Defines a chart legend. This component offers    additional configuration options beyond the defaults used by the legend attribute of the &lt;apex:chart> component. Note: This component must be enclosed within an &lt;apex:chart> component.


Options are :

  • apex:dataTable
  • apex:inputSecret
  • apex:pageBlockSectionItem
  • apex:legend (Correct)

Answer : apex:legend

Which exception type should be checked for when catching exceptions thrown when governor limits are exceeded?


Options are :

  • None of these (Correct)
  • StackOverflowException
  • InvalidLimitException
  • GovernorException
  • PlatformLimitException
  • LimitException

Answer : None of these

Comment / Suggestion Section
Point our Mistakes and Post Your Suggestions