What is a best practice when unit testing a controller? (Choose two.)

Salesforce PD2 - ExamTopics 2

Quiz
•
Computers
•
Professional Development
•
Easy
rachel laurete
Used 13+ times
FREE Resource
38 questions
Show all answers
1.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Simulate user interaction by leveraging Test.setMock()
Verify correct references by using getURL()
Access test data by using seeAllData=true
Set query parameters by using getParameters().put
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What Visualforce tag can be used to display custom messages in pages using the Salesforce UI styling for errors, warnings, and other types of messages?
<apex:customMessage>
<apex:error>
<apex:message>
<apex:pageMessage>
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A developer is working on code that requires a call to an external web service from a batch.
How should the developer enable this functionality?
Implement a custom System.CalloutException class
Include Database.AllowCallout() in the class definition
Implement an @future method for the callout, and invoke it from the batch
Specify "callout=true" in the batch implementation
4.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
A developer must create a custom pagination solution for accessing approximately 2000 records and displaying 50 records on each page. Data from Salesforce will be accessed via an API and not via Apex.
How can the developer meet these requirements? (Choose two.)
Use a StandardSetController
Use CURSOR 50 in SOQL queries
Use OFFSET in SOQL queries
Use LIMIT 50 in SOQL queries
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A developer must create a way for external partners to submit millions of leads into Salesforce per day.
How should the developer meet this requirement?
6.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Publicly expose an Apex Web Service via Force.com Sites
@HttpPatch
@HttpDelete
@HttpUpsert
@HttpAction
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A customer requires that when the billing address field on an Account gets updated, the address field on all its related contact records should reflect the same update.
How can this requirement be met with minimal customizations?
Create an After Trigger on Account to update its related contact records on update
Create a Workflow Rule on Account to update related child Contact records
Create a Lightning Process on Account to update related child Contact records
Create a scheduled batch job that updates all contact address fields based on the related account record
Create a free account and access millions of resources
Similar Resources on Quizizz
36 questions
Net+ DAY 5 and 6 Wireless Networking Cloud Concepts and Virtuali

Quiz
•
Professional Development
40 questions
311-350

Quiz
•
Professional Development
38 questions
How to test

Quiz
•
Professional Development
37 questions
DEVOPS LIFECYCLE

Quiz
•
Professional Development
39 questions
AZ900-06

Quiz
•
Professional Development
37 questions
Quizzinit Engineering Style!

Quiz
•
Professional Development
35 questions
A+ Core 1 - 1101 - Quiz 3

Quiz
•
Professional Development
35 questions
Agile Pre-Training Exam

Quiz
•
Professional Development
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade