Test
Test
Student
Employee
Freelancer
Other
1. A developer needs to write a method that searches for a phone number 0/2
that could be on multiple object types. Which method should the developer
use to accomplish this task?
SOSL Search
Correct answer
SOSL Search
Feedback
Wrong Answer`
2. Universal Containers (UC) has an integration with its Accounting system 0/2
that creates tens of ------ Salesforce in a nightly batch. UC wants to add
automation that can attempt to match Leads ------- Using the Email Address
field on the insert. UC is concerned about the performance of the -------
Which tool should UC use to automate this process?
Apex
Workflow Rules
Process Builder
Correct answer
Feedback
Wrong Answer`
3. What should a developer use to implement an automatic Approval 0/2
Process Submission for Cases?
A workflow rule
Process builder
Scheduled Apex
An Assignment rule
Correct answer
Process builder
Feedback
Wrong Answer`
4. A candidate may apply to multiple jobs at the company Universal 2/2
containers by submitting a single application per job posting. Once an
application is submitted for a job posting, that application cannot be
modified to be resubmitted to a different job posting. What can the
administrator do to associate an application with each job posting in the
schema for the organization?
Create a lookup relationship on both objects to a junction object called Job Posting
Applications
Create a lookup relationship in the Applications custom object to the Job Postings
custom object.
Feedback
You're an expert!
5. Which declarative method helps ensure quality data? (Choose 3 0/2
answers)
Exception Handling
Workflow Alerts
Validation Rules
Lookup Filters
Page Layouts
Correct answer
Validation Rules
Lookup Filters
Page Layouts
Feedback
Wrong Answer`
6. An org has different Apex classes that provide Account-related 0/2
functionality. After a new validation rule is added to the Account object,
many of the test methods fail. What can be done to resolve the failures and
reduce the number of code changes needed for future validation rules?
(Choose 2 answers)
Create a method that creates valid Account records & call this method from
within test methods
Create a method that loads valid account records from a static resource, and call
this method within test methods
Create a method that performs a callout for a valid Account record, and call this
method from within the test methods
Create a method that queries for valid account records and call this methos from
within test methods
Correct answer
Create a method that creates valid Account records & call this method from within
test methods
Create a method that loads valid account records from a static resource, and call
this method within test methods
Feedback
Wrong Answer`
7. In a single record, a user selects multiple values from a multi-select 0/2
picklist. How are the selected values represented in Apex?
Correct answer
Feedback
Wrong Answer`
8. A user selects a value from a multi-select picklist. How is this selected 0/2
value represented in Apex?
As a string
Correct answer
As a string
Feedback
Wrong Answer`
Feedback
You're an expert!
10. In a single record, a user selects multiple values form a multi-select 0/2
picklist. How are the selected values represented in Apex?
Correct answer
Feedback
Wrong Answer`
11. How can a custom type be identified as unique when added to a set ? 0/2
Correct answer
Feedback
Wrong Answer`
12. Which collection type provides unique key/value pairings of data? 0/2
List
Map
Array
Set
Correct answer
Map
Feedback
Wrong Answer`
13. An Org has a single account named ’NoContacts’ that has no related 0/2
contacts. Given the query:List<Account> accounts = [Select ID, (Select
ID, Name from contacts) from Account where Name=“NoContacts’];
Accounts[0] is Null.
A QueryException is thrown
Correct answer
Feedback
Wrong Answer`
14, Which two Apex data types can be used to reference a Salesforce 0/2
record ID Dynamically? (Choose two answers)
String
External ID
sObject
ENUM
Correct answer
String
sObject
Feedback
Wrong Answer`
15. A method is passed a list of generic sobjects as a parameter. What 0/2
should the developer do to determine which object type (Account, Lead,
Contact , for example ) to cast each sObject ?
Use a try-catch construct to cast the sObject into one of the three sObject
types.
Use the first three characters of the sObject ID to determine the sObject type
Use the getSObjectName method on the sObject class to get the sObject name
Use the getSObjectType method on each generic sOBbect to retrieve the sObject
token
Correct answer
Use the getSObjectType method on each generic sOBbect to retrieve the sObject
token
Feedback
Wrong Answer`
16. What is the value of x after the code segment executes? String x = ‘A’; 2/2
Integer i = 10; if(i<15){ i=15; x = ‘B’; }else if(i<20) { X = ‘C’; }else { X = ‘D’; }
Feedback
You're an expert!
17. When the number of records in a recordset is unknown which control 0/2
statement should a developer use to implement set of code that executes
for every record in the recordset, without performing a .size() or .length()
method call?
For(init_stmt;exit_condition;increment_stmt){…}
Do{…}while(condition)
While(condition) {..}
Correct answer
Feedback
Wrong Answer`
18. Which code segment can be used to control when the dowork() 0/2
method is called?
If(trigger.IsRunning){dowork();}
For(trigger.IsInsert t : trigger.new){dowork();}
If(trigger.IsInsert){dowork();}
Correct answer
If(trigger.IsInsert){dowork();}
Feedback
Wrong Answer`
19. A developer is creating test coverage for a class and needs to insert 0/2
records to validate functionality. Which method annotation should be used
to create records for every method in the test class?
@isTest(SeeAllDate=true)
@PreTest
@TestSetup
@BeforeTest
Correct answer
@TestSetup
Feedback
Wrong Answer`
20. What are three characteristics of static methods? (Choose 2 answers) 0/2
Correct answer
Feedback
Wrong Answer`
21. A developer wants to display all of the available record types for a Case 0/2
object. The developer also wants to display the picklist values for the
Case.Status field. The Case object and the Case.Status field are on a
custom VF page. Which action can the developer perform to get the record
types and picklist values in the controller?(Choose 2 answers)
Use SOQL to query Case records in the org to get all the RecordType values
available for Case.
Use SOQL to query Case records in the org to get all the values for the Status
picklist field.
Correct answer
Feedback
Wrong Answer`
22. Which type of information is provided by the Checkpoints tab in the 0/2
Developer Console? (Choose 2 answers)
Exception
Debug Statement
Namespace
Time
Correct answer
Exception
Namespace
Feedback
Wrong Answer`
23. What is a valid source and destination pair that can send or receive 0/2
change sets? (Choose 2 answers)
Sandbox to Production
Sandbox to Sandbox
Correct answer
Sandbox to Production
Sandbox to Sandbox
Feedback
Wrong Answer`
24. What should a developer working in a sandbox use to exercise a new 0/2
test class before the developer class to production? (Choose 2 answers)
Correct answer
Feedback
Wrong Answer`
25. What is true of a partial sandbox that is not true of a full sandbox? 0/2
Limited to 5 GB of data.
Correct answer
Feedback
Wrong Answer`
26. Which three tools can deploy metadata to productions? (Choose 3 0/2
answers)
Data Loader
Force.com IDE
Metadata API
Correct answer
Force.com IDE
Metadata API
Feedback
Wrong Answer`
27. Before putting an app into production, which step should be taken? 2/2
Feedback
You're an expert!
28. What are two testing considerations when deploying code from a 0/2
sandbox to production? (Choose 2 answers)
Correct answer
Feedback
Wrong Answer`
29. Which user can edit a record after it has been locked for approval? 0/2
(Choose 2 answers)
An administrator
Correct answer
An administrator
Feedback
Wrong Answer`
30. In which two org types can a developer create new Apex classes? 0/2
(Choose 2 answers)
Unlimited Edition
Enterprise Edition
Developer Edition
Sandbox
Correct answer
Developer Edition
Sandbox
Feedback
Wrong Answer`
31. What are two ways a developer should deploy code from a developer 0/2
org to an unrelated production org? (Choose 2 answers)
Login to the production org and set the developer org as an inbound connection
in the Deployment Settings screen.
Save the code to a folder on the developer’s computer, create an incoming Change
Set in the production org, and upload the files directly.
Package the code as an unmanaged package and install it in the production org.
Use an IDE to upload the new code directly into the production org using the
metadata API
Correct answer
Package the code as an unmanaged package and install it in the production org.
Use an IDE to upload the new code directly into the production org using the
metadata API
Feedback
Wrong Answer`
32. A developer is creating an application to track engines and their parts. 2/2
An individual part can be used in different types of engines. What data
model should be used to track the data and to prevent orphan records?
Create a lookup relationship to represent how each part relates to the parent engine
object
Create a junction object to relate many engines to many parts through a lookup
relationship.
Feedback
You're an expert!
A list of sObjects.
Feedback
You're an expert!
34. How would a developer use Schema Builder to delete a custom to 0/2
delete a custom field from the Account object that was required for
prototyping but is no longer needed?
Remove all the references in the code and then the field will be removed from
Schema Builder.
Remove all references from the code and then delete the custom field from
Schema Builder.
Mark the field for deletion in Schema Builder and then delete it from the declarative
UI.
Delete the field from Schema Builder and then all references in the code will be
removed.
Correct answer
Remove all references from the code and then delete the custom field from Schema
Builder.
Feedback
Wrong Answer`
35. Using the schema builder, a developer tries to change the API name of 0/2
a field that is referenced inan Apex Test Class. What is the end results?
The API name of the field is changed, and a warning is issued to update the
class
The API name of the field and the reference in the test class is updated
The API name of the field and the reference in the test class is changed
The API name is not changed and there are no other impacts.
Correct answer
The API name is not changed and there are no other impacts.
Feedback
Wrong Answer`
36. What is the output of the following code ?Integer index = 1;Integer 2/2
counter = 2;do { System.debug(index); index++; counter++;
} while (index ==20 "counter == 21);
Feedback
You're an expert!
37. A developer writes the following code :List<Account> acc = { SELECT Id 0/2
FROM Account LIMIT 10 };Delete
acc;System.Debug(Limits.getDMLStatements() + ' , '+
Limits.getLimitDMLstatements() };What is the result of this debug
statement ?
2150
1150
2200
1100
Correct answer
1150
Feedback
Wrong Answer`
38. Given the code block:Integer x;for (x = 0; x<10; x+=2)( if(x==8) 0/2
break; if(x==10) break;)system,debug(x);Which value will the system,
debug statement display?
10
Correct answer
Feedback
Wrong Answer`
39. What are two valid options for iterating through each Account in the 0/2
collection List<Account> named AccountList? (Choose 2 answers)
for(AccountList){…}
Correct answer
Feedback
Wrong Answer`
40. A developer has the controller class below:Public with sharing class 2/2
myFooController {Public integer prop { get; private set;}}Which code block
will run successfully in an execute anonymous window?
Feedback
You're an expert!
41. A visualforce interface is created for Case Management that includes 2/2
both standard and custom functionality defined in an Apex class called
myControllerExtension. The visualforce page shouldinclude which
<apex:page> attribute(s) to correctly implement controller
functionality?
extensions=”myControllerExtension”
controller=”myControllerExtension”
Feedback
You're an expert!
Feedback
You're an expert!
43. What is the printed from the following code? Integer a = 0; Integer b; a = 0/2
a++; a++; Integer c = a*5; String s = String.value(c) + a; System.debug(s + ‘;’
+ a +’;’ + b);
51;1;0
51;1;null
6;1; null
6;1;0
Correct answer
51;1;null
Feedback
Wrong Answer`
44. A developer created a Visualforce page with a custom controller to 0/2
show a list of accounts. The page uses the <apex:SelectList>
component, with a variable called “selection”, to show the valid values for
Account.Type. The page uses an <apex:pageBlockTable> component
to display the list of accounts, where the iteration variable is “acct”. The
developer wants to ensure that when a user selects a type on the
<apex:selectList> component, only accounts with that type are shown
on the page. What should the developer do to accomplish this? (Choose 2
answer)
Create multiple lists in the controller that represent the relevant accounts for each
account type when the page loads, then reference the correct one dynamically on
the pageBlockTable.
Create a component for each option and use a variable with hide parameter on the
element.
Use the onChange event to update the list of accounts in the controller when the
value changes, and then re-render the pageBlockTable.
Correct answer
Use the onChange event to update the list of accounts in the controller when the
value changes, and then re-render the pageBlockTable.
Feedback
Wrong Answer`
45. A developer uses a before insert trigger on the lead object to fetch the 2/2
Territory__c object, where the Territory__c.PostalCode__c matches the
Lead.PostalCode. The code fails when the developer uses the Apex data
loader to insert 10000 lead records. The developer has the following code
bloack: 01 for(Lead l: Trigger.new){ 02 If (l.PostalCode != null){ 03
List<Territory__c> terrlist = [Select Id from Territory__c where
PostalCode__c = :l.PostakCode]; 04 if(terrList.size() > 0){ 05 l.Territory__c =
terrList[0].Id; } } } Which line of code is causing the block to fail?
Feedback
You're an expert!
46. A developer in Salesforce org with 100 Accounts executes the 0/2
following code using the Developer console:Account myAccount = new
Account(Name=’MyAccount’);Insert myAccount;For(Integer x=0;
x<150;x++){ Account newAccount = new
Account(Name=’MyAccount’+x); try{ insert
newAccount;}catch(Exception ex){System.debug(ex);}}Insert new
Account(Name=’MyAccount’);How many accounts are in the org after this
code is run?
101
100
252
102
Correct answer
100
Feedback
Wrong Answer`
47. A developer has the following trigger that fires after insert and creates 0/2
a child case whenever a new Case is created.List<Case> childCases = new
List<Case>();For(Case parent: Trigger.new){ Case child = new
Case(Parentd = parent.Id, Subject = parent.Subject);
childCases.add(child);}insert childCases;What happens after the code
block executes?
Multiple child cases are created for each parent case in Trigger.new
Correct answer
Feedback
Wrong Answer`
48. A developer creates a custom controller and custom Visualforce page 0/2
by using the following code block:public class myController {public String
myString;public String getMyString() {return 'getmyString';}public String
getStringMethod1() {return myString;}public String getStringMethod2() {if
(myString == null)myString = 'Method2';return myString;}}{!myString},
{!StringMethod1}, {!StringMethod2}, {!myString}.What does the user see
when accessing the custom page?
getMyString, , ,
, , Method2,
, , Method2, getMyString
Correct answer
Feedback
Wrong Answer`
49. Given the code block: Integer x; for (x = 0; x<10; x+=2) { if (x==8) 0/2
break; if (x==10) break; } System.debug(x); Which value will the
system.debug statement display?
10
Correct answer
Feedback
Wrong Answer`
50. What is the capability of Force.com IDE? (Choose 2 answers) 0/2
Correct answer
Feedback
Wrong Answer`
Feedback
You're an expert!
52. Which statement about the lookup relationship between a Custom 2/2
Object and a Standard Object is correct?
The Lookup Relationship on the Custom Object can prevent the deletion of the
standard object.
The lookup relationship cannot be marked as required on the page layout for the
custom object.
The custom object will be deleted when the referenced standard object is deleted.
The custom object inherits security from the referenced Standard object.
Feedback
You're an expert!
53. A developer has a single custom controller class that works with a 2/2
Visualforce Wizard to support creating and editing multiple sObjects. The
wizard accepts data from user inputs across multiple Visualforce pages
and from a parameter on the initial URL. Which statement is unnecessary
inside the unit test for the custom controller?
ApexPages.currentPage().getParameters().put('input', 'TestValue')
Test.setCurrentPage(pageRef),
Declare the class and method using the global access modifier.
Declare the class as public and use the global access modifier on the method.
Declare the class as global and use the public access modifier on the method
Declare the class and method using the public access modifier.
55. A developer has an integer variable called maxAttempts. The developer 0/2
needs to ensure that once maxAttempts is initialized, it preserves its value
for the length of the Apex transaction; while being able to share the
variable’s state between trigger executions. How should the developer
declare maxAttempts to meet these requirements?
Correct answer
The test method does not use System.runaAs to execute as a specific user.
Correct answer
57. A developer has an apex controller for a Visualforce page that takes an 0/2
ID as URl parameter.How should the developer prevent a cross site
scripting vulnerability?
string.valueofstringapexpages.currentpage().getparameters().get(‘url_param’))
string.escapesinglequotes(apexpages.currentpage().getparameters().get(‘url_para
m’))
Correct answer
Set “Use the first value in the list as the default value” as True.
Correct answer
59. A developer must provide a custom user interface when users edit a 2/2
Contact. Users must be able to use the interface in Salesforce Classic and
Lightning Experience. What should the developer do to provide the custom
user interface?
Override the Contact’s Edit button with a Visualforce page in Salesforce Classic
and a Lightning component in Lightning Experience.
Override the Contact’s Edit button with a Visualforce page in Salesforce Classic and
a Lightning page in Lightning Experience.
Override the Contact’s Edit button with a Lightning component in Salesforce Classic
and a Lightning component in Lightning Experience.
Override the Contact’s Edit button with a Lightning page in Salesforce Classic and a
Visualforce page in Lightning Experience.
60. A developer is debugging the following code to determine why 0/2
Accounts are not being created.Account a = new
Account(Name='A');Database.insert(a, false);How should the code be
altered to help debug the issue?
Correct answer
Forms