Salesforce DEV-501 Certified Advanced Developer PracticeTest Set 1

What must a developer consider when inserting records using an API-based tool?


Options are :

  • Apex triggers are ignored. (Correct)
  • Universally required field settings are respected.
  • Required fields on page layouts are enforced.

Answer : Apex triggers are ignored.

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
  • Manual sharing, apex sharing
  • Static methods can only be declared in a top-level class definition. (Correct)
  • Make calls to methods using both valid and invalid inputs.

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

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

What are the five types of Apex procedural loops?


Options are :

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

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

A single column in a table. An <apex:column> component must always be a child of an
<apex:dataTable> or <apex:pageBlockTable> component.
Note that if you specify an sObject field as the value attribute for an <apex:column>, the
associated label for that field is used as the column header by default. To override this
behavior, use the headerValue attribute on the column, or the column's header facet.


Options are :

  • apex:column (Correct)
  • apex:insert
  • apex:inputText
  • apex:inputField

Answer : apex:column

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 :

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

Answer : Create a Visualforce page to replace the object detail view

What ways can classes be created in salesforce?


Options are :

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

Answer : Through UI, Force.com IDE project

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
  • Manual sharing, apex sharing
  • Map numbers = new Map; (Correct)
  • Failure response settings

Answer : Map numbers = new Map;

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:page
  • apex:chartLabel
  • apex:inlineEditSupport (Correct)
  • apex:outputPanel

Answer : apex:inlineEditSupport

Positions is a custom object in a recruiting application built on the Force.com platform.
Department is a field on the Position object.
Which type of report should a developer create to show hiring managers the number of
positions grouped by department?


Options are :

  • Tabular
  • Reporting Snapshot
  • Summary (Correct)
  • Pivot

Answer : Summary

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:inputFile (Correct)
  • apex:barSeries
  • apex:composition
  • apex:legend

Answer : apex:inputFile

What code is the webservice keyword not allowed to be used?


Options are :

  • Class, trigger
  • Queues, time triggers
  • Implicit invocation
  • code contained in a trigger (Correct)

Answer : code contained in a trigger

This integration resource provides generic access to any organization, and exposes
standard objects and fields through the SOAP interface.


Options are :

  • Custom WSDL
  • Partner WSDL (Correct)
  • Enterprise WSDL
  • System WSDL

Answer : Partner WSDL

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


Options are :

  • Select Class
  • SelectOption Class (Correct)
  • InputSelection Class
  • . OptionSelection Class

Answer : SelectOption Class

What determines how the email service responds when an attempt to access the email
service fails? 


Options are :

  • RETURNING
  • Failure response settings (Correct)
  • Queues, time triggers
  • Apex classes

Answer : Failure response settings

Which standard profile has the "View Encrypted Data" permission by default?


Options are :

  • Solution Manager Profile
  • . System Administrator Profile (Correct)
  • No profile has the permission active by default
  • Standard User Profile

Answer : . System Administrator Profile

Which keywords should u specify to define a constant?
? static and exception
? static and final
? static and private
? exception and final(No Answer)


Options are :

  • SOQL statements
  • static and final (Correct)
  • Multi-tenant
  • Setup menu

Answer : static and final

Which mechanism allows for authenticated access to a Force.com Site


Options are :

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

Answer : An active Customer Portal

What does Apex use to record disruptions in code execution?


Options are :

  • Exceptions (Correct)
  • Webservice
  • Catch
  • @ReadOnly

Answer : Exceptions

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 :

  • True (Correct)
  • False

Answer : True

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 :

  • Set the organization wide default for positions to Read-only
  • Assign the Read-only profile to all users
  • 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

How do you call Web Services from external sources?


Options are :

  • SOAP Web Service Callouts (Correct)
  • SOQL for loops
  • Webservice
  • SOQL statements

Answer : SOAP Web Service Callouts

A component that adds AJAX support to another component, allowing the component to be
refreshed asynchronously by the server when a particular event occurs, such as a button
click or mouseover.
See also: <apex:actionFunction>.


Options are :

  • apex:form
  • apex:page
  • apex:actionSupport (Correct)
  • apex:attribute

Answer : apex:actionSupport

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:inlineEditSupport
  • apex:insert
  • apex:column
  • apex:outputLabel (Correct)

Answer : apex:outputLabel

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


Options are :

  • ExistingPage Class
  • VisualforcePage Class
  • PageReference Class (Correct)
  • URLReference Class

Answer : PageReference Class

An HTML input element for a value that corresponds to a field on a Salesforce object. The
<apex:inputField> component respects the attributes of the associated field, including
whether the field is required or unique, and the user interface widget to display to get input
from the user. For example, if the specified <apex:inputField> component is a date field, a
calendar input widget is displayed. When used in an <apex:pageBlockSection>,
<apex:inputField> tags always display with their corresponding output label.
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:inputField> in the body of an
<apex:pageBlockSectionItem>.
Consider the following when using JavaScript events with this tag:
For lookup fields, mouse events fire on both the text box and graphic icon
For multi-select picklists, all events fire, but the DOM ID is suffixed with _unselected for the
left box, _selected for the right box, and _right_arrow and _left_arrow for the graphic icons
For rich text areas, no events fire.


Options are :

  • apex:define
  • apex:outputLabel
  • apex:pageBlockButtons
  • apex:inputField (Correct)

Answer : apex:inputField

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.


Options are :

  • apex:messages
  • apex:actionFunction (Correct)
  • apex:insert
  • apex:outputField

Answer : apex:actionFunction

Which statement is true regarding Force.com Sites?


Options are :

  • All of Above
  • None
  • Sites can leverage declarative page layouts as web pages.
  • Sites enables developers to build public, unauthenticated websites. (Correct)

Answer : Sites enables developers to build public, unauthenticated websites.

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 validation rules to expose the field
  • Use workflow to change the record type
  • Use workflow to change the field-level security
  • Use multiple Visualforce pages (Correct)

Answer : Use multiple Visualforce pages

A/an _____________ is a class written in Apex that adds to or overrides behavior in a
standard or custom controller.


Options are :

  • Apex extension
  • Controller extension
  • Extended Controller (Correct)
  • Custom component

Answer : Extended Controller

Comment / Suggestion Section
Point our Mistakes and Post Your Suggestions