Question 58: Correct
A developer has an Apex controller for a Visualforce page that takes an ID as a URL
parameter.
How should the developer prevent a cross-site scripting vulnerability?
String. ValueOf([Link]).getParametters).get(urlparam)
. [Link]([Link](-getParameters)-get('url_p
aram)
[Link]).getParameters).get(urlparam).escapeHtml0(Correct
)
• [Link]).getParameters).get(url_param)
Question 59: Correct
A developer writes a trigger on the Account object on the before update event that
increments a count field. A workflow rule also increments the count field every time that
an Account is created or updated.
The field update in the workflow rule is configured to not re
evaluateworkflow rules.
What is the value of the count field if an Account is inserted with an initial value of zero,
assuming no other automation logic is implemented on the Account?
3
4
1
• 2(Correct)
Question 60: Correct
A developer must create an Apex class, ContactController, that a Lightning component
can use to search for Contact records.
Users of the Lightning component should only be able to search for Contact records to
which they have access.
Which two will restrict the records correctly?
Choose2 answers.
• Public with sharing class ContactController.(Correct)
Public class ContactController.
Public inherited sharing class ContactController.(Correct)
Public without sharing class ContactController.
Question 61: Correct
Which two statements are accurate regarding Apex classes and interfaces?
Choose 2 answers.
• Classes are final by default. (Correct)
Inner classes are putblic by default.
• Interface methods are public by default.
• A TOP-LEVEL Class can only have one inner class level.(Correct)
Question 62: Correct
The OrderHelper class is a utility class that contains business logic for processing
orders. Consider the following code snippet:
Public class without sharing OrderHelper {
llcode implementation
A developer
needs to create a constant named DELIVERY_MULTIPLIER with a value of
4.15. The value of theconstant should not modify any time in the code.
How should the developer declare the DELIVERY_MULTIPLIER constant to meet the
business objectives?
static final decimal DELIVERY_MULTIPLIER=4.15; (Correct)
static decimal DELIVERY_MULTIPLIER = 4.15;
• constant decimal DELIVERY _MULTIPLIER = 4.15;
• decimal DELIVERY_MULTIPLIER = 4.15;
Question 63: Correct
Which two statements accurately represent the MVC framework implementation in
Salesforce?
Choose 2 answers.
• Lightning component HTML files represent the Model (M) part of the MVC
framework.
Standard and Custom objects used in the app schema represent the View (V)
part of the MVC framework.
• Validation rules enforce business rules and represent the Controller (C) part of
the MVC framework.(Correct)
Records created or updated by triggers represent the Model (M) part of the MVC
framework.(Correct)
Question 64: Correct
Cloud Kicks stores Orders and Line Items in Salesforce. For security reasons, financial
representatives are allowed to see information on the Order such as order amount, but
they are not allowed to see the Line items on the Order.
Which type of relationship should be used?
• Indirect lookup.
Direct Lookup.
• Lookup.(Correct)
Master-Detail.
Question 65: Correct
Given the code below:
List<Account> alist [SELECT ld FROM Account);
for (Account a aList){
:
= (SELECT ld FROM Contact WHERE Accountld =
List<Contact> cList :[Link]):
• Combine the two SELECT statements into a single SOQL statement. (Correct)
Add a LIMIT clause to the first SELECT SOQL statement.
Rework the code and eliminate for a loop.
Add a WHERE clause to the first SELECT SOQL statement.
Question 66: Correct
A business implemented a gamification plan to encourage its customers to watch some
educational videos.
Customers can watch videos over several days, and their progress is recorded. Award
points are granted to customers for all completed videos. When the video is marked as
completed in Salesforce, an external web service must be called so that points can be
awarded to the user.
A developer implemented these requirements in the after update trigger by making a
call to an external web service. However, a [Link] is occurring.
What should the developer do to fix this error?
• Replace the after update trigger with a before insert trigge.
• Move the callout to an asynchronous method with @future(callout=true)
annotation.(Correct)
Surround the external call with a try-catch block to handle the exception.
Write a REST service to integrate with the external web service.
Question 67: Correct
Which three steps allow a custom SVG to be included in a Lightning web component?
Choose3 answers.
• Upload the SVG as a static resource.(Correct)
Import the SVG as a content asset file.
Reference the import in the HTML template.
• Reference the getter in the HTML template.(Correct)
Import the static resource and provide a getter for it in JavaScript.(Correct)
Question 68: Correct
A developer is migrating a Visualforce page into a Lightning web component.
The Visualforce page shows information about a single record. The developer decides
to use Lightning Data Service to access record data.
Which security consideration should the developer be aware of?
• Lightning Data Service handles sharing rules and field-level security.(Correct)
Lightning Data Service ignores field-level security.
• The with sharing keyword must be used to enforce sharing rules.
• The isAccessible() method must be used for field-level access checks.
Question 69: Correct
Which annotation exposes an Apex class as a RESTful wetb service?
RemoteAction
@AuraEnabled
@RestResource(Correct)
@Httplnvocable
Question 70: Correct
Which two characteristics are true for Aura component events?
Choose 2 answers.
• Depending on the current propagation phase, calling event. stopPropagation)
may not stop the event propagation.
The event propagates to every owner in the containment hierarchy.(Correct)
By default, containers can handle events thrown by components they contain.
If a container component needs to handle a component event, add a
handleFacets=true attribute to its handler. (Correct)
Page 27 89
Question 71: Correct
Management asked for opportunities to be automatically created for accounts with
annual revenue greater than $ 1,000,000.
A developer created the following trigger on the Account object to satisfy the
requirement.
for(Account a: [Link]) {
if([Link] > 1000000)
{
List<Opportunity> oppList = [SELECT Id FROM Opportunity WHERE accountid =
([Link]):
If (oppList. size () == 0) {
Opportunity oppty new Opportunity (Name [Link], StageName
"Prospecting'.
CloseDate = [Link] (). addDays (30):
insert oppty:
Users are able to update the account records via the Ul and can see an opportunity
created for high annual revenue accounts. However, when the administrator tries to
upload a list of 179 accounts using Data Loader, it fails with [Link] errors.
Which two actions should the developer take to fix the code segment shown above?
Choose 2 answers.
• Query for existing opportunities outside of the for loop. (Correct)
Check if all the required fields for Opportunity are being added on creation.
Use Database. query to query the opportunities.
Move the DML that saves opportunities outside of the for loop.(Correct)
Question 72: Correct
Universal Containers has a Visualforce page that displays a table of every Container_c
being rented by a given Account. Recently this page is failing with a view state limit
because some of the customers rent over 10,000 containers.
What should a developer change about the Visualforce page to help with the page load
errors?
• Use lazy loading and a transient List variable.
Implement pagination with an OffsetController.
Implement pagination with a Standard SetController.(Correct)
Use JavaScript remoting with SOQL Offset.
Question 73: Correct
The sales management team at Universal Containers requires that the Lead Source field
of the Lead record be populated when a Lead is converted.
What should be used to ensure that a user populates the Lead Source field prior to
converting a Lead?
.Formula Field.
Workflow Rule.
Process Builder.
Validation Rule.(Correct)
Question 74: Correct
Which two events need to happen when deploying to a production org?
Choose 2 answers.
• All Visual Flows must have at least 1% test coverage.
• All Apex code must have at least 75% test coverage.(Correct)
• All process Builder Processes must have at least 1% test coverage.
• All triggers must have at least 1% test coverage.(Correct)
Question 75: Correct
Adeveloper receives an error when trying to call a global server-side method using the
@remoteAction decorator.
How can the developer resolve the error?
• Decorate the server-side method with (static=false)
• Add static to the server-side method signature.(Correct)
• Decorate the server-side method with (static=true).
• Change the function signature to be private static.
Question 76: Correct
A software company uses the following objects and relationships:
• Case: to handle customer support issues.
• DefectC: a custom object to represent known issues with the company's software.
•Case_Defect _c: a Junction object between Case and Defect_c to represent that a
defect is a cause of a customer issue.
• Case and Defect_c have Private organization-wide defaults.
What should be done to share a specific Case_Defect_c record with the user?
• Share the parent Case record.
• Share the Case_Defect_c record.
• Share the parent Case and Defect_c records.(Correct)
• Share the parent Defect_c record.
Question 77: Correct
A developer is asked to create a Visualforce page that lists the contacts owned by the
current user. This component will be embedded in a Lightning page.
Without writing unnecessary code, which controller should be used for this purpose?
Lightning controller.
• Standard list controller. (Correct)
• Custom controller.
• Standard controller.
Question 78: Correct
A developer needs to create a baseline set of data (Accounts, Contacts, Products,
Assets) for an entire suite of tests allowing them to test independent requirements
various types of Salesforce Cases.
Which approach can efficiently generate the required data for each unit test?
• Add @isTest(seeAllData=true) at the start of the unit test class.
Create test data before [Link](0 in the unit test.
• Use @testSetup with a void method.(Correct)
Create a nock using the Stud API.
Question 79: Correct
Refer to the code below:
Const p1 =3.1415926;
What is the data type of p1?
• Decimal
• Number(Correct)
Float
Double
Question 80: Correct
AW Computing tracks order information in custom objects called Order_c and
Order_Line_c. Currently, all shipping information is stored in the Order_c object.
The company wants to expand its order application to support split shipments so that
any number of Order._Line_c records on a single Order_c can be shipped to different
locations.
What should a developer add to fulfill this requirement?
Order Shipment_Group_c object and master-detail field on Order_c
• Order_ShipmentGroup_c object and master-detail field on Order_Line_c(Correct)
Order_Shipment_Group_c object and master-detail fields to Order_c and
Order_Line_c
Order_Shipment Group_c object and master-detail field on
Order Shipment Group c
Question 81: Correct
A developer wrote Apex code that calls out to an external system.
How should a developer write the test to provide test coverage?
• Write a class that implements WebserviceMock.
• Write a class that implements the HTTPCalloutMock interface. (Correct)
. Write a class that extends WebserviceMock.
• Write a class that extends HTTPCalloutMock.
Question 82: Correct
A developer needs an Apex method that can process Account or Contact records.
Which method signature should the developer use?
• Public void doWork(Account Contact)
Public void doWork(sObject theRecord)(Correct)
• Public void doWork(Account || Contact)
• Public void doWork(Record theRecord)
Question 83: Correct
A developer identifies the following triggers on the Expensec object:
deleteExpense,
applyDefaults ToExpense,
validateExpenseUpdate;
The triggers process before delete, before insert, and before update events respectively.
Which two techniques should the developer implement to ensure trigger best practices
are followed?
Choose 2 answers.
• Maintain all three triggers on the Expense_cobject, but move the Apex logic out
of the trigger definition.
• Create helper classes to execute the appropriate logic when a record is
saved. (Correct)
• Unify all three triggers in a single trigger on the Expense_c object that includes
all events.(Correct)
• Unify the before insert and before update triggers and use Process Builder for the
delete action.
Question 84: Correct
Which two are phases in the Salesforce Aura Application Event propagation framework?
Choose 2 answers.
Default(Correct)
• Emit
Bubble(Correct)
• Control
Question 85: Correct
The code below deserialized input into a list of Account.
01 public class AcctCreater
02 public void insertAccounts () {
03 String accts Json = getAccountsJson ():
04 List<Account> accts = (List<Account>)
[Link](acctsJson, List<Account>.class);
05
06 I/ DML to insert accounts
07
08 1..other code including getAccountsJson implementation
09
Which code modification should be made to insert the Accounts so that field-level
security is respected?
05 accts = Database. stripinaccessible (accts, Database. CREATABLE):
• 01 public with sharing class AcctCreator
• 05 SObjectAccessDecision sd = Security. striplnaccessible
([Link], accts). (Correct)
05 if ([Link] ())
Question 86: Correct
Where are two locations a developer can look to find information about the status of
batch or future methods?
Choose 2 answers.
• Paused Flow Interviews component.
Time-Based Workflow Monitor.
• Apex Flex Queue. (Correct)
• Apex Jobs. (Correct)
Question 87: Correct
What are two characteristics related to formulas?
Choose 2 answers.
. Formulas can reference themselves.
• Formulas are calculated at runtime and are not stored in the database.(Correct)
Formulas can reference values in related objects. (Correct)
Fields that are used in a formula filed can be deleted or edited without editing the
formula.
Question 88: Correct
The initial value for a number field on a record is1. A user updated the value of
the
number field to 10.
This action invokes a workflow field update, which changes the value of the number
field to 11. After the workflow field update, an update trigger fires.
What is the value of the number field of the object that is obtained from [Link]?
11
• 10
• Null
1(Correct)
Question 89: Correct
A developer created a trigger on the Account object and wants to test if the trigger is
properly bulkified. The developer team decided trigger should be tested with 200
account records with unique names.
What two things should be done to create the test data within the unit test with the least
amount of code
Choose 2 answers.
• Create a static resource containing test data.(Correct)
Use the Qis Test (is Parallel=true) annotation in the test class.
Use the @is Test (seeAlData=true) annotation in the test class.
• Use [Link] to populate data in your test methods.(Correct)
Question 90: Correct
The values HIGH, 'MEDIUM AND' LOW are identified as common values for multiple
picklists across different objects.
What is an approach a developer can take to streamline maintenance of the picklists
and their values, while also restricting the values to the ones mentioned above?
• Create the picklist on each object and adda validation rule to ensure data
integrity.
Create the picklist on each object and select "Restrict picklist to the values
defined in the value set".
Create the picklist on each object as a required field and select "Display values
alphabetically, not in the order entered.
Create the picklist on each object and use a Global Picklist Value Set containing
the values.(Correct)
Question 91: Correct
Which action may cause triggers to fire?
• Renaming or replacing a picklist entry.
• Cascading delete operations.
Updates to Feed Items. (Correct)
Changing a user's default division when the transfer division option is checked.
Question 92: Correct
Which code in a Visualforce page and/or controller might present a security
vuinerability?
• <apex:outText value="(!$[Link])" />
• <apex:output Text escape="false" value=(!&[Link]. usersinput)
I(Correct)
<apex:outputField escape=false" value="[Link]" />
<apex:outputField value="{[Link])" />
Question 93: Correct
A developer is building custom search functionality that uses SOSL to search account
and contact records that match search term by the end-user. The feature is exposed
through a Lightning web component, and the end-user is able to provide a list of terms
to search.
Consider the following code snippet:
@AuraEnabled
Public static List<List<sObject>> search Terms (List<String> termList) {
List<ListesObject>> result = new List<List<sObject>> ();
For (String term: termlList) {
[Link] ((FIND: term IN ALL FIELDS RETURNING Account(Name), Contact
(FirstName, LastName)l):
return result;
What is the maximum number of search terms the end-user can provide to successfully
execute the search without a governor limit?
• 200
150
2000
20(Correct)
Question 94: Correct
A developer has a requirement to write Apex code to update a large number of account
records on a nightly basis. The system administrator needs to be able to schedule the
class to run after business hours on an as-needed basis.
Which class definition should be used to successfully implement this requirement?
• Global inherited sharing class ProcessAccountProcessor implements
Schedulable
Global inherited sharing class ProcessAccountProcessor implements
[Link]<sObject>
Global inherited sharing class ProcessAccountProcessor implements
[Link]<sObject>, Schedulable(Correct)
• Global inherited sharing class ProcessAccountProcessor implements Queueable.
Question 95: Correct
Cloud kicks has a multi-screen flow that its call center agents use when handling
inbound service desk calls.
At one of the steps in the flow, the agents should be presented with a list of order
numbers and dates that are retrieved from an external order management system in real
time and displayed on the screen.
What should a developer use to satisfy this requirement?
• An invocable method(Correct)
• An outbound message
• An Apex controller
• An Apex REST class
Question 96: Correct
A developer must provide custom user interfaces when users edit a Contact in either
Salesforce Classic or Lightning Experience.
What should the developer use to override the Contact's Edit button and provide this
functionality?
• A Lightning page in Salesforce Classic and a Visualforce page in Lightning
Experience.
• AVisualforce page in Salesforce Classic and a Lightning page in Lightning
Experience.
A Lightning component in Salesforce Classic and a Lightning component in
Lightning Experience.
• A Visualforce page in Salesforce Classic and a Lightning component in Lightning
Experience.(Correct)
Question 97: Correct
A developer needs to implement the functionality for a service agent to gather multiple
pieces of information from a customer in order to send a replacement credit card.
Which automation tool meets these requirements?
Lightning Component.
Flow Builder.(Correct)
Process Builder
• Approval Process.
Question 98: Correct
A
developer is creating a lightning web component to show a list of sales records.
The Sales Representative user should be able to see the commission field on each
record. The sales assistant should be able to see all fields on the record except the
commission field.
How should this be enforced so that the component works for both users without
showing any error?
• Use WITH SECURITY_ENFORCED in the SOQL that fetches the data for the
component.
Use Lightning Data Service to get the collection of sales records.
Use Lightning Locker Service to enforce sharing rules and field-level security.
• Use [Link] to remove fields inaccessible to the current
user.(Correct)
Question 99: Correct
A team of many developers works in their own individual orgs that have the same
configuration as the production org.
Which type of org is best suited for this scenario?
Developer Edition.
Partner Developer Edition.
Full Sandbox.
• Developer Sandbox. (Correct)
Question 100: Correct
A developer is tasked to perfom a security review of the ContactSearch Apex class that
exists in the system. Within the class, the developer identifies the following method as a
security threat:
List<Contact> performSearch(String lastName)X
Return [Link](SELECT ld, FirstName, LastName FROM Contact WHERE
LastName Like % +lastName+ %' );
What are two ways the developer can update the method to prevent a S0QL Injection
attack?
Choose 2 answers.
• Use a variable binding and replace the dynamic query with the static
SOQL.(Correct)
• Use the escapeSingleQuotes method to sanitize the parameter before lts
use.(Correct)
Use a regular expression on the parameter to remove special characters.
Use the @ReadOnly annotation and the with sharing keyword on the class.
Question 101: Correct
A developer wrote the following two classes:
public with sharing class StatusFetcher {
private Boolean active = true;
private Boolean isActive () {
return active;
public with sharing class Calculator {
public void docalculations (){
StatusFetcher sFetcher = new StatusFetcher ():
If ([Link] 0){
Il do calculations here
The StatusFetcher class successfully compiled and saved. However, the Calculator
class has a compile-time error.
How should the developer fix this code?
Make the isActive method in the StatusFetcher class public.(Correct)
Change the class declaration for the StatusFetcher class to public with inherited
sharing.
Make the docalculations method in the Calculator class private.
Change the class declaration for the Calculator class to public with inherited
sharing.
Question 102: Correct
What does the Lightning Component framework provide to developers?
Support for Classic and Lightning Uls.
• Templates to create custom components.
Prebuilt components that can be reused.(Correct)
Extended governor limits for applications.
Question 103: Correct
Given the following Apex statement:
= [
Account myAccount Select ID, Name from Account);
What occurs when more than one account is returned by the SOQL query?
• The variable, myAccount is automatically cast to the List data type.
The first Account returned is assigned to myAccount.
The query fails and an error is written to the debug log.
• An unhandled exception is thrown and the code terminates.(Correct)
Question 104: Correct
The following automations already exists on the Account object:
•A workflow rule that updates a field when a certain criteria is met
A custom validation on the field.
•A flow that updates related contact records.
A developer created a trigger on the Account object.
What should the developer consider while testing the trigger code?
A workflow rule field update will cause the custom validation to run again.
Workflow rules will fire only after the trigger has commítted all DML operations to
the database.
The flow may be launched multiple times.
The trigger may fire multiple times during a transaction.(Correct)
Question 105: Correct
What is the fundamental difference between a Master-Detail relationship and a Lookup
relationship?
In a Lookup relationship when the parent record is deleted, the child records are
always deleted.
A Master-Detail relationship detail record inherits the sharing and security of its
master record.(Correct)
In a Master-Detail relationship, when a record of a master object is deleted, the
detail records are not deleted.
In a Lookup relationship, the field value is mandatory.
Question 106: Correct
An org has two custom objects:
• Plan_c, which has a master-detail relationship to the Account object.
• Plan_Item_c, which has a master-detail relationship to the Plan_c object.
What should a developer use to create a Visualforce section on the Account page layout
that displays all of the Plan, Account, and all of the Plan_Item_c records related to those
Plan_c records.
standard controller with a controller extension.
A
controller extension with a custom controller.
A
A standard controller with a custom controller.
• A custom controller by itself.(Correct)
Question 107: Correct
Which statement should be used to allow some of the records in a list of records to be
inserted if others fail to be inserted?
• [Link](records, false)(Correct)
[Link](records, true)
• insert records
insert (records, false)