Pdi SF
Pdi SF
Pdi SF
Universal Containers (UC) is developing a process for their sales teams that requires all sales reps to
go through a set of scripted steps with each new customer they create. In the first step of collecting
information, UC’s ERP system must be checked via a REST endpoint to see if the customer exists. If the
customer exists, the data must be presented to the sales rep in Salesforce. Which two should a
developer implement to satisfy the requirements?
o Flow
o Invocable Method
2. Universal Containers recently transitioned from Classic to Lightning Experience. One of its business
processes requires certain values from the Opportunity object to be sent via an HTTP REST callout to
its external order management system based on an ad-hoc basis when the user presses a custom
button on the Opportunity detail page. Example values are as follows:
• Name
• Amount
• Account
Which two methods should the developer implement to fulfil the business requirement?
o Create a Lightning component that performs the HTTP REST callout and use a Lightning Action to
expose the component on the Opportunity detail page.
o Create a Visualforce page that performs the HTTP REST callout and use a Visualforce quick action
to expose the component on the Opportunity detail page.
5. Which two statements are true about using the @testSetup annotation in an Apex test class?
o A method defined with the @testSetup annotation executes once for each test method in the test
class and counts towards system limits
o The @testSetup annotation is not supported when the @isTest(SeeAllData=True) annotation is
used
1
7. A developer must write an Apex method that will be called from a Lightning component. The method
may delete an Account stored in the accountRec variable. Which method should a developer use to
ensure only users that should be able to delete Accounts can successfully perform deletions?
o Schema.sObjectType.Account.isDeletable()
8. Which three code lines are required to create a Lightning component on a Visualforce page?
o $Lightning.use
o $Lightning.createComponent
o <apex:includeLightning/>
9. 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?
o Create the Picklist on each object and use a Global Picklist Value Set containing the values
10. 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?
o A Visualforce page in Salesforce Classic and a Lightning component in Lightning Experience
11. 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 in each record. The Sales Assistant
user 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 errors?
o Use Security.striptInaccessible to remove fields inaccessible to the current user
12. Where are two locations a developer can look to find information about the status of batch or future
methods?
o Apex Flex Queue
o Apex Jobs
13. A developer needs to implement a custom SOAP Web Services that is used by an external Web
Application. The developer chooses to include helper methods that are not used by the Web
Application in the implementation of the Web Service Class. Which code segment shows the correct
declaration of the class and methods?
o global class WebServiceClass {
private Boolean helperMethod() {/* implementation... */}
Webservice static String updateRecords() {/* implementation... */}
}
14. A development team wants to use a deployment script to automatically deploy to a sandbox during
their development cycles. Which two tools can they use to run a script deploys to a sandbox?
o SFDX CLI
o Ant Migration Tool
2
15. Universal Containers has a large number of custom applications that were built using a third-party
JavaScript framework and exposed using Visualforce pages. The company wants to update these
applications to apply styling that resembles the look and feel of Lightning Experience. What should
the developer do to fulfill the business request in the quickest and most effective manner?
o Incorporate the Salesforce Lightning Design System CSS stylesheet into the JavaScript applications
17. Since Aura application events follow the traditional publish-subscribe model, which method is used to
fire an event?
o Fire()
18. What should a developer use to obtain the Id and Name of all the Leads, Accounts, and Contacts that
have the company name ‘Universal Containers’?
o FIND ‘Universal Containers’ IN Name Fields RETURNING lead(id, name), account(id, name),
contact(id, name)
20. Which three resources in an Aura component can contain JavaScript functions?
o Renderer
o Controller
o Helper
21. A developer is implementing an Apex class for a financial system. Whithin the class, the variables
‘creditAmount’ and ‘debitAmount’ should not be able to change once a value is assigned. In which two
ways can the developer declare the variables to ensure their value can only be assigned one time?
o Use the final keyword and assign its value when declaring the value
o Use the final keyword and assign its value in the class constructor
23. A developer is asked to prevent anyone other than a user with Sales Manager profile from changing
the Opportunity Status to Closed Lost if the lost reason is blank. Which automation allows the
developer to satisfy this requirement in the most efficient manner?
o An error condition formula on a validation rule on Opportunity
3
24. What are three considerations when using the @InvocableMethod annotation in Apex?
o A method using the @InvocableMethod annotation can be declared as Public or Global
o Only one method using the @InvocableMethod annotation can be defined per Apex class
o A method using the @InvocableMethod annotation must be declared as static
25. A developer created these three Rollup Summary fields in the custom object, Project__c:
• Total_Timesheets__c
• Total_Approved_Timesheets__c
• Total_Rejected_Timesheet__c
The developer is asked to create a new field that shows the ratio between rejected and approved
timesheets for a given project. Which should the developer use to implement the business requirement in
order to minimize maintenance overhead?
o Formula field
26. 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?
o Order_Shipment_Group__c object and master-detail field on Order_Line__c
28. A developer wants to get access to the standard price book in the org while writing a test class that
covers an OpportunityLineItem trigger. Which method allows access to the price book?
o Use Test.getStandardPricebookId() to get the standard price book ID
29. 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?
o Implement pagination with a StandardSetController
4
30. What are three capabilities of the <ltng:require> tag when loading JavaScript resources in Aura
components?
o Specifying loading order
o Loading scripts in parallel
o One-time loading for duplicate scripts
31. A developer is integrating with a legacy on-premise SQL database. What should the developer use to
ensure the data being integrated is matched to the right records in Salesforce?
o External ID field
32. Universal Containers wants Opportunities to no longer be editable when reaching the Closed/Won
stage. How should a developer accomplish this?
o Use a validation rule
33. When a user edits the Postal Code on an Account, a custom Account text field named ‘Timezone’ must
be updated based on the values in a PostalCodeToTimezone__c custom object. Which two automation
tools can be used to implement this feature?
o Fast Field Updates record-triggered flow
o Account trigger
34. When importing and exporting data into Salesforce, which two statements are true?
o Data import wizard is an application that is installed on your computer
o Developer and Developer Pro sandboxes have different storage limits
35. The account object in an organization has a master-detail relationship to a child object called Branch.
The following automations exist:
• Roll-up summary fields
• Custom validation rules
• Duplicate rules
A developer created a trigger on the Account object. Which two things should the developer consider
while testing the trigger code?
o The trigger may fire multiple times during a transaction
o Rollup summary fields can cause the parent record to go through Save
36. Which two events need to happen when deploying to a production org?
o All triggers must have some test coverage
o All Apex code must have at least 75% test coverage
37. Universal Containers has implemented an order management application. Each Order can have one
or more Order Line items. The Order Line object is related to the Order via a master-detail relationship.
For each Order Line item, the total price is calculated by multiplying the Order Line item price with the
quantity ordered. What is the best practice to get the sum of all Order Line item totals on the Order
record?
o Roll-up summary field
5
38. A business has a proprietary Order Management System (OMS) that creates orders from their website
and fulfills the orders. When the order is created in the OMS, an integration also creates an order
record in Salesforce and relates it to the contact as identified by the email on the order. As the order
goes through different stages in the OMS, the integration also updates it in Salesforce. It is noticed
that each update from the OMS creates a new order record in Salesforce. Which two actions will
prevent the duplicate order records from being created in Salesforce?
o Ensure that the order number in the OMS is unique
o Write a before trigger on the order object to delete any duplicates
39. 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
this requirement.
for (Account a: Trigger.new){
if (a.AnnualRevenue > 1000000){
List<Opportunity> oppList = [SELECT Id FROM Opportunity WHERE accountId =
:a.Id];
if (oppList.size() == 0){
Opportunity oppty = new Opportunity(Name = a.name, StageName = ‘Prospecting’,
CloseDate = system.today().addDays(30));
Insert oppty;
}
}
}
Users are able to update the account records via the UI 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 System.Exception errors. Which two actions should the developer take to fix
the code segment shown above?
o Move the DML that saves opportunities outside the for loop
o Query for existing opportunities outside the for loop
41. While working in a sandbox, an Apex test fails when run in the Test Framework. However, running the
Apex test logic in the Execute Anonymous window succeeds with no exceptions or errors. Why did the
method fail in the sandbox test framework but succeed in the Developer Console?
o The test method relies on existing data in the sandbox
42. A developer wants to mark each Account in a List<Account> as either Active or Inactive, based on the
value in the LastModifiedDate field of each Account being greater than 90 days in the past. Which
Apex technique should the developer use?
o A for loop, with an if-else statement inside
6
43. What does the Lightning Component framework provide to developers?
o Prebuilt components that can be reused
44. A lead developer creates an Apex interface called Laptop. Consider the following code snippet:
public class SilverLaptop{ //code implementation }
How can a developer use the Laptop interface within the SilverLaptop class?
o Public class SilverLaptop extends Laptop
45. Refer to the following code snippet, that is part of a custom controller for a Visualforce page:
public void updateContact (Contact thisContact) {
thisContact.Is_Active__c = false;
try {
update thisContact;
} catch (Exception e) {
String errorMessage = ‘An error occurred while updating this Contact.
‘+e.getMessage();
ApexPages.addmessage(new ApexPages.message(ApexPages.severity.FATAL,
errorMessage));
}
}
In which two ways can the try/catch be enclosed to enforce object and field-level permissions and
prevent the DML statement from being executed if the current logged-in user does not have the
appropriate level of access?
o Use if (Schema.sObjectType.Contact.fields.Is_Active__c.isUpdateable())
o Use if (Schema.sObjectType.Contact.isUpdateable())
46. A developer is writing tests for a class and needs to insert records to validate functionality. Which
annotation method should be used to create records for every method in the test class?
o @TestSetup
47. Which Salesforce org has a complete duplicate copy of the production org including data and
configuration?
o Full Sandbox
48. A custom object Trainer__c has a lookup field to another custom object Gym__c. Which SOQL query
will get the record for the Viridian City Gym and all it’s trainers?
o SELECT Id, (SELECT Id FROM Trainers__c) FROM Gym__c WHERE Name = ‘Viridian City Gym’
49. Which three statements are true regarding custom exceptions in Apex?
o A custom exception class name must end with “Exception”
o A custom exception class name can implement one or many interfaces
o A custom exception class name must extend the system Exception class
50. Which action causes a before trigger to fire by default for Accounts?
o Importing data using the Data Loader and the Bulk API
7
51. A developer created a trigger on the Account object and wants to test if the trigger is properly
bulkified. The developer team decided that the 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?
o Create a static resource containing test data
o Use Test.loadData to populate data in your test methods
53. A company has a custom object, Sales_Help_Request__c, that has a Lookup relationship to
Opportunity. The Sales_Help_Request__c has a number field, Number_of_Hours__c, that represents
the amount of time spent on the Sales_Help_Request__c. A developer is tasked with creating a field,
Total_Hours__c, on Opportunity that should be the sum of all of the Number_of_Hours__c values for
the Sales_Help_Request__c records related to that Opportunity. What should the developer use to
implement this?
o A record-triggered flow on the Sales_Help_Request__c object
54. An org has an existing flow that creates an Opportunity with an Update Records element. A developer
must update the flow to also create a Contact and store the created Contact’s ID on the Opportunity.
Which update must the developer make in the flow?
o Add a new Create Records element
55. A developer must troubleshoot to pinpoint the causes of performance issues when a custom page
loads in their org. Which tool should the developer use to troubleshoot?
o Developer Console
56. A developer is creating an app that contains multiple Lightning web components. One of the child
components is used for navigation purposes. When a user clicks a button called Next in the child
component, the parent component must be alerted so it can navigate to the next page. How should
this be accomplished?
o Create a custom event
57. Which code statement includes an Apex method named updateAccounts in the class
AccountController for use in a Lightning web component?
o Import updateAccounts from ‘@salesforce/apex/AccountController.updateAccounts’;
8
58. Which two sfdx commands can be used to add testing data to a Developer sandbox?
o Force:data:bulk:upsert
o Force:data:tree:import
59. What should a developer use to script the deployment and unit test execution as part of continuous
integration?
o Salesforce CLI
60. A PrimaryId__c custom field exists on the Candidate__c custom object. The field is used to store each
candidate’s id number and is marked as Unique in the schema definition. As part of a data enrichment
process, Universal Containers has a CSV file that contains updated data for all candidates in the
system. The file contains each Candidate’s primary id as a data point. Universal Containers wants to
upload this information into Salesforce, while ensuring all data rows are correctly mapped to a
candidate in the system. Which technique should the developer implement to streamline the data
upload?
o Update the PrimaryId__c field definition to mark it as an External Id
61. A developer wrote an Apex method to update a list of Contacts and wants to make it available for use
by Lightning web components. Which annotation should the developer add to the Apex method to
achieve this?
o @AuraEnabled(cacheable=true)
62. A developer must create a CreditCardPayment class that provides an implementation of an existing
Payment class.
public virtual class Payment {
public virtual void makePayment (Decimal amount) {/*implement...*/}
}
Which is the correct implementation?
o Public class CreditCardPayment extends Payment {
public override void makePayment (Decimal amount) {/*implement...*/}
}
63. Universal Containers (UC) processes orders in Salesforce in a custom object, Order__c. They also allow
sales reps to upload CSV files with thousands of orders at a time. A developer is tasked with integrating
orders placed in Salesforce with UC’s enterprise resource planning (ERP) system. After the status for
an Order__c is first set to ‘Placed’, the order information must be sent to a REST endpoint in the ERP
system that can process one order at a time. What should the developer implement to accomplish
this?
o Callout from an @future method called from a trigger
64. What are two ways for a developer to execute tests in an org?
o Developer Console
o Tooling API
9
65. Which statement describes the execution order when triggers are associated to the same object and
event?
o Trigger execution order cannot be guaranteed
66. What should a developer do to check the code coverage of a class after running all tests?
o View the code coverage percentage for the class using the Overall Code Coverage panel in the
Developer Console Tests tab
67. Universal Containers wants Opportunities to no longer be editable when it reaches the Closed/Won
stage. Which two strategies can a developer use to accomplish this?
o Use a validation rule
o Use a trigger
68. A developer created a new after insert trigger on the Lead object that creates Task records for each
Lead. After deploying to production, an existing outside integration that inserts Lead records in
batches to Salesforce is occasionally reporting total batch failures being caused by the Task insert
statement. This causes the Integration process in the outside system to stop, requiring a manual
restart. Which change should the developer make to allow the integration to continue when some
records in a batch cause failures due to the Task insert statement, so that manual restarts are not
needed?
o Use the Database method with allOrNone set to false
69. Which Apex class contains methods to return the amount of resources that have been used for a
particular governor, such as the number of DML statements?
o Limits
70. If Apex code executes inside the execute() method of an Apex class when implementing the Batchable
interface, which two statements are true regarding governor limits?
o The Apex governor limits are reset for each iteration of the execute() method
o The Apex governor limits are omitted while calling the constructor of the Apex class
71. What are three capabilities of the <ltng:require> tag when loading JavaScript resources in Aura
components?
o Loading scripts in parallel
o Specifying loading order
o One-time loading for duplicate scripts
72. What are two use cases for executing Anonymous Apex code?
o To schedule an Apex class to run periodically
o To run a batch Apex class to update all Contacts
73. How should a developer write unit tests for a private method in an Apex class?
o Use the TestVisible annotation
10
74. A developer has an integer variable called maxAttempts. The developer 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?
o Declare maxAttempts as a constant using the static and final keywords
75. A company wants to implement a new call center process for handling customer service calls. It
requires service reps to ask for the caller’s account number before proceeding with the rest of their
call script. Following best practices, what is the optimal approach to satisfy this requirement?
o Flow Builder
76. The Job_Application__c custom object has a field that is a master-detail relationship to the Contact
object, where the Contact object is the master. As part of a feature implementation, a developer needs
to retrieve a list containing all Contact records where the related Account Industry is ‘Technology’,
while also retrieving the Contact’s Job_Application__c records. Based on the object’s relationships,
what is the most efficient statement to retrieve the list of Contacts?
o [SELECT Id, (SELECT Id FROM Job_Applications__c) FROM Contact WHERE Accounts.Industry =
‘Technology’];
77. A developer must create a DrawList class that provides capabilities defined in the Sortable and
Drawable interfaces.
public interface Sortable { void sort(); }
public interface Drawable { void draw(); }
Which is the correct implementation?
o Public class Drawlist implements Sortable, Drawable {
public void sort() { /*implementation*/ }
public void draw() { /*implementation*/ }
}
78. A developer is tasked to perform 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){
return Database.query(‘SELECT Id, FirstName, LastName FROM Contact WHERE
LastName Like %’+lastName+’%’];
}
What are two ways the developer can update the method to prevent a SOQL injection attack?
o Use variable binding and replace the dynamic query with a static SOQL
o Use the escapeSingleQuotes method to sanitize the parameter before its use
79. A developer is creating a page that allows users to create multiple Opportunities. The developer is
asked to verify the current user’s default Opportunity record type, and set certain default values based
on the record type before inserting the record. How can the developer find the current user’s default
record type?
o Use Opportunity.SObjectType.getDescribe().getRecordTypeInfos() to get a list of record types, and
iterate through them until isDefaultRecordTypeMapping() is true
11
80. What are three characteristics of change set deployments?
o Sending a change set between two orgs requires a deployment connection
o Change sets can only be used between related organizations
o Deployment is done in a one-way, single transaction
81. Which two are phases in the Aura application event propagation framework?
o Bubble
o Default
82. Which three Salesforce resources can be accessed from a Lightning web component?
o All external libraries
o SVG resources
o Static resources
84. A developer must modify the following code snippet to prevent the number of SOQL queries issued
from exceeding the platform governor limit.
public without sharing class OpportunityService{
Public static List<OpportunityLineItem> getOpportunityProducts(Set<Id>
opportunityIds){
List<OpportunityLineItem> oppLineItems = new
List<OpportunityLineItem>();
For(Id thisOppId : opportunityIds){
OppLineItems.addAll([SELECT Id FROM OpportunityLineItem WHERE
OpportunityId = :thisOppId]);
}
Return oppLineItems;
}
}
The above method might be called during a trigger execution via a Lightning component. Which
technique should be implemented to avoid reaching the governor limit?
o Use the System.Limits.getQueries() method to ensure the number of queries is less than 100
85. A custom Visualforce controller calls the ApexPages.addMessage() method, but no messages are
rendering on the page. Which component should be added to the Visualforce page to display the
message?
o <apex:pageMessages/>
12
87. Where are two locations a developer can look to find information about the status of batch or future
methods?
o Apex Flex Queue
o Apex Jobs
88. An org has an existing flow that creates an Opportunity with an Update Records element. A developer
must update the flow to also create a Contact and store the created Contact’s ID on the Opportunity.
Which update must the developer make in the flow?
o Add a new Create Records element
89. When a user edits the Postal Code on an Account, a custom Account text field named ‘Timezone’ must
be updated based on the values in another custom object called PostalCodeToTimezone__c. What is
the optimal way to implement this feature?
o Build a flow with Flow Builder
90. A developer at Universal Containers is tasked with implementing a new Salesforce application that will
be maintained completely by their company’s Salesforce administrator. Which two options should be
considered for building out the business logic layer of the application?
o Validation Rules
o Record-Triggered Flows
91. In the following example, which sharing context will myMethod execute when it is invoked?
Public Class myClass {
public void myMethod() { /* implementation */ }
}
o Sharing rules will be inherited from the calling context
92. A developer created a child Lightning web component nested inside a parent Lightning web
component. The parent component needs to pass a string value to the child component. In which two
ways can this be accomplished?
o The parent component can use the Apex controller class to send data to the child component
o The parent component can use a public property to pass the data to the child component
93. A Salesforce administrator used Flow Builder to create a flow named ‘accountOnBoarding’. The flow
must be used inside an Aura component. Which tag should a developer use to display the flow in the
component?
o Lightning:flow
94. Universal Containers decides to use exclusively declarative development to build out a new Salesforce
application. Which three options should be used to build out the database layer for the application?
o Custom objects and fields
o Relationships
o Roll-up summaries
13
95. A custom picklist field, Food_Preference__c, exists on a custom object. The picklist contains the
following optons: ‘Vegan’, ‘Kosher’, ‘No Preference’. The developer must ensure a value is populated
every time a record is created or updated. What is the optimal way to ensure a value is selected every
time a record is saved?
o Mark the field as Required on the field definition
96. 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 done to ensure that a user populates
the Lead Source field prior to converting a Lead?
o Use a validation rule
97. A developer wants to improve runtime performance of Apex calls by caching results on the client.
What is the most efficient way to implement this and follow best practices?
o Decorate the server-side method with @AuraEnabled(cacheable=true)
98. A developer wants to import 500 Opportunity records into a sandbox. Why should the developer
choose to use Data Loader instead of Data Import Wizard?
o Data Import Wizard does not support Opportunities
99. A developer needs to have records with specific field values in order to test a new Apex class. What
should the developer do to ensure the data is available to the test?
o Use Test.loadData() and reference a CSV file in a static resource
100. Which annotation should a developer use on an Apex method to make it available to be wired
to a property in a Lightning web component?
o @AuraEnabled(cacheable=true)
101. What can be used to override the Account’s standard Edit button for Lightning Experience?
o Lightning component
103. Universal Containers hires a developer to build a custom search page to help users find the
Accounts they want. Users will be able to search on Name, Description, and a custom comments field.
Which consideration should the developer be aware of when deciding between SOQL and SOSL?
o SOSL is faster for text searches
o SOQL is able to return more records
104. Universal Containers wants to back up all of the data and attachments in its Salesforce org
once a month. Which approach should a developer use to meet this requirement?
o Define a Data Export scheduled job
14
105. How can a developer check the test coverage of autolaunched Flows before deploying them
in a change set?
o Use SOQL and the Tooling API
107. Which Lightning code segment should be written to declare dependencies on a Lightning
component, c:accountlist, that is used in a Visualforce page?
o <aura:application access=”GLOBAL” extends=”ltng:outApp”>
<aura:dependency resource=”c:accountList”/>
</aura:application>
108. A developer created a custom order management app that uses an Apex class. The order is
represented by an Order object and an OrderItem object that has a master-detail relationship to
Order. During order processing, an order may be split into multiple orders. What should a developer
do to allow their code to move some existing OrderItem records to a new Order record?
o Create a junction object between OrderItem and Order
110. A developer must create a Lightning component that allows users to input Contact record
information to create a Contact record, including a Salary__c custom field. What should the developer
use, along with a lightning-record-edit-form, so that Salary__c field functions as a currency input and
is only viewable and editable by users that have the correct field level permissions on Salary__c?
o <lightning-input-field field-name=”Salary__c”></lightning-input-field>
15
111. A company has been adding data to Salesforce and has not done a good job of limiting the
creation of duplicate Lead records. The developer is considering writing an Apex process to identify
duplicates and merge the records together. Which two statements are valid considerations when
using merge?
o Merge is supported with accounts, contacts, cases, and leads
o The merge method allows up to three records, including the master and two additional records
with the same sObject type, to be merged into the master record
112. Which two operations affect the number of times a trigger can fire?
o Roll-up summary fields
o Lightning flows
113. Which three steps allow a custom Scalable Vector Graphic (SVG) to be included in a Lightning
web component?
o Reference the property in the HTML template
o Import the static resource and provide a JavaScript property for it
o Upload the SVG as a static resource
114. What are two ways a developer can get the status of an enqueued job for a class that
implements the queueable interface?
o View the Apex Flex Queue
o Query the AsyncApexJob object
115. When using Salesforce DX, what does a developer need to enable to create and manage
scratch orgs?
o Dev Hub
116. An org tracks customer orders using the Order and Line Item objects. The Line Item object has
a master-detail relationship to the Order object. A developer has a requirement to calculate the total
order amount for an Order and the line amount on each Item based on quantity and price. What is
the correct implementation?
o Implement the line amount as a numeric formula field and the order amount as a roll-up summary
field
117. Assuming that name is a String obtained by an <apex:inputText> tag on a Visualforce page,
which two SOQL queries performed are safe from SOQL injection?
o String query = ‘%’ + name + ‘%’;
List<Account> results = [SELECT Id FROM Account WHERE Name LIKE :query];
o String query = ‘SELECT Id FROM Account WHERE Name LIKE \’%’ +
String.escapeSingleQuotes(name) + ‘%\’’;
118. Which two are best practices when it comes to Aura component and application event
handling?
o Reuse the event logic in a component bundle, by putting the logic in the helper
o Handle low-level events in the event handler and re-fire them as higher-level events
16
119. Refer to the code snippet below:
Import fetchOpps from ‘@salesforce/apex/OpportunitySearch.fetchOpportunities’;
@wire(fetchOpps)
Opportunities;
When a Lightning web component is rendered, a list of opportunities that match certain criteria should
be retrieve from the database and displayed to the end-user. Which three considerations must the
developer implement to make the fetchOpportunities method available within the Lightning web
component?
o The method must specify the (cacheable=true) attribute
o The method must specify the (continuation=true) attribute
o The method must be annotated with the @AuraEnabled annotation
120. While writing an Apex class, a developer wants to make sure that all functionality being
developed is handled as specified by the requirements. Which approach should the developer use to
be sure that the Apex class is working according to specifications?
o Create a test class to execute the business logic and run the test in the Developer Console
121. How does the Lightning Component framework help developers implement solutions faster?
o By providing device-awareness for mobile and desktops
122. Cloud Kicks Fitness, an ISV Salesforce partner, is developing a managed package application.
One of the application modules allows the user to calculate body fat using the Apex class, BodyFat,
and its method, calculateBodyFat(). The product owner wants to ensure this method is accessible by
the consumer of the application when developing customizations outside the ISV’s package
namespace.
Which approach should a developer take to ensure calculateBodyFat() is accessible outside the
package namespace?
o Declare the class sand method using the global access modifier
123. Universal Containers implemented a private sharing model for the Account object. A custom
Account search tool was developed with Apex to help sales representatives find accounts that match
multiple criteria they specify. Since its release, users of the tool report they can see Accounts they do
not own. What should the developer use to enforce sharing permissions for the currently logged in
user while using the custom search tool?
o Use the with sharing keyword on the class declaration
17
125. A developer is debugging the following code to determine why Accounts are not being created.
List<Account> accts = getAccounts(); // getAccounts implemented elsewhere
Database.insert(accts, false);
How should the code be altered to help debug the issue?
o Collect the insert method return value in a SaveResult variable
126. A developer has a Visualforce page and custom controller to save Account records. The
developer wants to display any validation rule violations to the user.
How can the developer make sure that validation rule violations are displayed?
o Include <apex:messages> on the Visualforce page
127. When a user edits the Postal Code on an Account, a custom Account text field named
‘Timezone’ must be updated based on the values in another custom object callled
PostalCodeToTimezone__c.
Which is the optimal way to implement this feature?
o Build a flow with Flow Builder
128. A developer has a single custom controller class that works with a Visualforce Wizard to
support creating and editing multiple sObjects. The wizard accepts data from user imputs across
multiple Visualforce pages and from a parameter on the initial URL.
Which three statements are useful inside the unit test to effectively test the custom controller?
o ApexPages.currentPage().getParameters().put(‘input’, ‘TestValue’);
o Test.setCurrentPage(pageRef);
o String nextPage = controller.save().getUrl();
129. Universal Containers is building a recruiting app with an Applicant object that stores
information about an individual person and a Job object that represents a job. Each applicant may
apply for more than one job.
What should a developer implement to represent that an applicant has applied for a job?
o Junction object between Applicant and Job
130. Universal Containers (UC) wants to lower its shipping cost while making the shipping process
more efficient. The Distribution Officer advises UC to implement global addresses to allow multiple
Accounts to share a default pickup address. The developer is tasked to create the supporting object
and relationship for this business requirement and uses the Setup Menu to create a custom object
called “Global Address”.
Which field should the developer add to create the most efficient model that supports the business
need?
o Add a lookup field on the Account object to the Global Address object
131. Which two scenarios require an Apex method to be called imperatively from a Lightning web
component?
o Calling a method that is not annotated with cacheable=true
o Calling a method that is external to the main controller for the Lightning web component
18
132. A developer creates a new Apex trigger with a helper class, and writes a test class that only
exercises 95% coverage of the new Apex helper class. Change Set deployment to production fails with
the test coverage warning: “Test coverage of selected Apex Trigger is 0%, at least 1% test coverage is
required”
What should the developer do to successfully deploy the new Apex trigger and helper class?
o Create a test class and methods to cover the Apex trigger
134. Which two settings must be defined in order to update a record of a junction object?
o Read/Write access on the primary relationship
o Read/Write access on the secondary relationship
135. 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 Ligthning page.
Without writing unnecessary code, which controller should be used for this purpose?
o Standard controller
136. A developer has identified a method in an Apex class that performs resource intensive actions
in memory by iterating over the result set of a SOQL statement on the account. The method also
performs a DML statement to save the changes to the database.
Which two techniques should the developer implement as a best practice to ensure transaction control and
avoid exceeding governor limits?
o Use the System.Limit class to monitor the current CPU governor limit consumption
o Use the Database.Savepoint method to enforce database integrity
137. In terms of the MVC paradigm, what are two advantages of implementing the view layer of a
Salesforce application using Lightning Web Component-based development over Visualforce?
o Rich component ecosystem
o Self-contained and reusable units of an application
138. Universal Containers decides to use purely declarative development to build out a new
Salesforce application. Which two options can be used to build out the business logic layer for this
application?
o Validation Rules
o Record-Triggered flow
19
139. An Opportunity needs to have an amount rolled up from a custom object that is not in a
master-detail relationship. How can this be achieved?
o Write a trigger on the child object and use an aggregate function to sum the amount for all related
child objects under the Opportunity.
140. 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?
o Lightning Data Service handles sharing rules and field-level security
141. Universal Containers has a support process that allows users to request support from its
engineering team using a custom object, Engineering_Support__c. Users should be able to associate
multiple Engineering_Support__c records to a single Opportunity record. Additionally, aggregate
information about the Engineering_Support__c records should be shown on the Opportunity record.
Which relationship field should be implemented to support these requirements?
o Master-detail field from Engineering_Support__c to Opportunity
142. 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 for various types of Salesforce
Cases. Which approach can efficiently generate the required data for each unit test?
o Use @TestSetup with a void method
143. A developer must implement a CheckPaymentProcessor class that provides check processing
payment capabilities that adhere to what is defined for payments in the PaymentProcessor interface.
Public interface PaymentProcessor { void pay(Decimal amount); }
Which implementation is correct to use the PaymentProcessor interface class?
o Public class CheckPaymentProcessor implements PaymentProcessor { public void
pay(Decimal amount){ //functional code here } }
144. A team of developers is working on a source-driven project that allows them to work
independently, with many different org configurations. Which type of Salesforce orgs should they use
for their development?
o Scratch orgs
145. A developer created a Lightning web component called statusComponent to be inserted into
the Account record page. Which two things should the developer do to make this component
available?
o Add <target>lightning__RecordPage</target> to the statuscomponent.js-meta.xml file
o Set isExposed to true in the statusComponent.js-meta.xml file
146. Ursa Major Solar has a custom object, ServiceJob__c, with an optional Lookup field to Account
called Partner_Service_Provider__c. The TotalJobs__c field on Account tracks the total number of
ServiceJob__c records to which a partner service provider Account is related. What is the most
efficient way to ensure that the TotalJobs__c field is kept up to date?
o Create a record-triggered flow on ServiceJob__c
20