Question 1: Correct
Application Events follow the traditional publish-subscribe model.
Which method is used to fire an event?
• fire( )(Correct)
• registerEvent()
emit()
fireEvent()
Question 2: Correct
A workflow updates the value of a custom field for an existing Account.
How can a developer access the updated custom field value from a trigger?
By writing a Before Insert trigger and accessing the field value from Trigger.new
• By writing an After Insert trigger and accessing the field value from Trigger.old
• By writing an After Update trigger and accessing the field value from Trigger.old
• By writing a Before Update trigger and accessing the field value from
Trigger.new(Correct)
Question 3: Correct
A
developer wants to retrieve the Contacts and Users with the email address
'dev@uc.com. Which SOSL statement should the developer use?
FIND (dev@uc.com) IN Email Fields RETURNING Contact (Ermail), User
(Email)(Correct)
FIND {Email = 'dev@uc.com} IN Contact, User
FIND Email IN Contact, User FOR (dev2uc.com)
FIND {Email = 'dev@uc.com} RETURNING Contact (Email), User (Email)
Question 4: Correct
Given the following trigger Implementation:
trigger leadTrigger on Lead (before update0(
final ID BUSINESS_RECORDTYPEID ='012500000009Qad';
for(Lead thisLead: Trigger.new}
if(thisLead.Company !=null &&thisLead.RecordTypeld
!=BUSINESS_RECORDTYPE)\
=
thisLead.RecordTypeld BUSINESS_RECORDTYPEID;
The developer receives deployment errors every time a deployment is attempted from
Sandbox to Production.
What should the developer do to ensure a successful deployment?
• Ensure the deployment is validated by a System Admin user on Production.
Ensure BUSINESS_RECORDTYPEID is retrieved using Schema.Describe
calls.(Correct)
Ensure BUSINESS_RECORDTYPEID is pushed as part of deployment components
Ensure a record type with an ID of BUSINESS_RECORDTYPEID exists on
Production prior to deployment.
Question 5: Correct
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?
Choose 2 answers.
The Apex governor limits cannot be exceeded due to the asynchronous nature of
the transaction.
• The Apex governor limits are relaxed while calling the constructor of the Apex
class.
The Apex governor limits are reset for each iteration of the execute ()
method.(Correct)
The Apex governor limits might be higher due to the asynchronous nature of the
transaction.(Correct)
Question 6: Correct
A developer creates a Lightning web component that imports a method within an Apex
class. When a Validation button is pressed, that runs to execute complex validations.
implementation scenario, which artifact is part of the Controller according to the
In this
MVC architecture?
XML file
HTML file
• Apex class(Correct)
JavaScript file
Question 7: Correct
Which process automation should be used to send an outbound message without using
Apex code?
• Workflow Rule.(Correct)
• Process Builder.
Strategy Builder.
• Flow Builder.
Question 8: Correct
Assuming that 'name' is aString obtained by an (apex: inputText) tag on a Visualforce
page, which two SOQL queries performed are safe from SOQL injection?
Choose 2 answers.
String query = 'SELECT Id FROM Account WHERE Name LIKE \"'$" +
name.noQuotes) +'$\"; List <Account> results = Database.query (query);
• String query = "SELECT Id FROM Account WHERE Name LIKE \"$" +
String.escapeSingleQuotes (name) +"$\"; List<Account> results = Database.
query (query): (Correct)
• String query ='' + name +'$';
o List<Account> results = [SELECT Id FROM Account WHERE Name LIKE:
queryl:(Correct)
• String query = 'SELECT Ild FROM Account WHERE Name LIKEI'S+ name +'$\";
o List<Account> results = Database. query (query);
Question 9: Correct
An Apex method, getÁccounts, that returns a List of Accounts given a search Term, is
available for Lightning Web cormponents to use.
What is the correct definition of a Lightning Web component property that uses the
getAccounts method?
@AuraEnabled(getAccounts, (searchTerm: $searchTerm')
accountist;
@AuraEnabled(getAccounts, 'SsearchTerm')
o accountList;
@wire(getAccounts, { searchTerm: '$searchTerm' })
o accountList:(Correct)
@wire(getAccounts, S$searchTerm')
accountList;
Question 10: Correct
A developer wants to import 500 Opportunity records into a sandbox.
Because of what reason developer choose Data Loader over the Data Import Wizard?
Data Loader automatically relates Opportunities to Accounts.
Data Import Wizard does not support Opportunities.(Correct)
Data Loader runs from the developer's browser.
Data Import Wizard can not import all 500 records.
Question 11: Correct
When importing and exporting data into Salesforce, which two statements are true?
Choose 2 answers.
Bulk APIl can be used to import large data volumes in development environments
without bypassing the storage limits.(Corect)
Bulk APl can be used to bypass the storage limits when importing large data
volumes in development environments.
Developer and Developer Pro sandboxes have different storage limits.(Correct)
The data import wizard is a client application provided by Salesforce.
Question 12: Correct
What are three considerations when using the @lnvocableMethod annotation in Apex?
Choose 3 answers.
A method using the (QinvocableMethod annotation can have multiple input
parameters.
• A method using the @invocableMethod annotation must be declared as
static.(Correct)
Only one method using the QinvocableMethod annotation can be defined per
Apex class.(Correct)
A method using the @lnvocableMethod annotation can be declared as Public or
Global.(Correct)
• A method using the (@invocableMethod annotation must define a return value.
Question 13: Correct
Which two types of process automation can be used to calculate the shipping cost for
an Order when the Order is placed and apply a percentage of the shipping cost to some
of the related Order Products?
Choose 2 answers.
Workflow Rule
. Flow Builder(Correct)
• Approval Process
• Process Builder(Correct)
Question 14: Correct
Which three statements are accurate about debug logs?
Choose 3 answers.
• Debug Log Levels are cumulative, where FINE Log level includes all events logged
at the DEBUG, INF0, WARN, and ERROR levels.(Correct)
I CAN'T LOOK!!!!
but must
I
peek...
To View Debug Logs, "Manage Users or "View All Data" permission is
needed.(Correct)
• To View Debug Logs, "Manage Users" or "Modify All Data" permission is needed.
• The amount of information logged in the debug log can be controlled by the log
levels.(Correct)
The amount of information logged in the debug log can be controlled
programmatically.
Question 15: Correct
A recursive transaction is initiated by a DML statement creating records for these two
objects:
•
Accounts
•Contacts.
The Account trigger hits a stack depth of 16.
Which statement is true regarding the outcome of the transaction?
The transaction is partially committed up until the stack depth is exceeded.
The transaction succeeds and all changes are committed to the
database.(Correct)
The transaction fails and all the changes are rolled back.
The transaction succeeds as long as the Contact trigger stack depth is less than
or equal to 16.
Question 16: Correct
How does the lightning component framework help developers implement solutions
faster?
By providing code review standards and processes.
By providing device- awareness for mobile and desktops.(Correct)
By providing an agile process with default steps.
By providing change history and version control.
Question 17: Correct
A developer creates a custom exception as shown below:
public class ParityException extends Exception ()
What are two ways the developer can fire the exception in Apex?
Choose 2 answers.
• throw new ParityException ('parity does not match):(Correct)
throw new ParityException():(Correct)
new ParityException (parity does not match):
new ParityException ():
Question 18: Correct
Cloud Kicks (CK) wants to lower its shipping cost while making the shipping process
more efficient. The Distribution Officer advises CK 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 createa custom object called "Global
Address".
Which field should the developer add to create the most efficient model that supports
the business need?
• Add a Lookup field on the Account object to the Global Address object.(Correct)
Add a Master-Detail field on the Account object to the Global Address object.
Add a Master-Detail field on the Global Address object to the Account object.
Add a Lookup field on the Global Address object to the Account object.
Question 19: Correct
An org tracks customer orders on an Order object and the line Items of an Order on the
Line Item object. The line lItem object has a Master-Detail relationship to the order
object.
A developerhas a requirement to calculate the order amount on an Order and the line
amount on each Line Item based on quantity and price.
What is the correct implementation?
• Write a process on the Line Item that calculates the item amount and order
amount and updates the fields on the Line Item and the Order.
• Implement the line amnount as a numeric formula field and the order amount as a
roll-up summary field. (Correct)
• Implement the line amount as a currency field and the order amount as a SUM
formula field.
• Write a single before trigger on the Line Item that calculates the item amount and
updates the order anmount on the Order.
Question 20: Correct
What should a developer do to check the code coverage of a class after running alI
tests?
View the Overall Code Coverage panel of the Tests tab in the Developer
Console.(Correct)
View the Class Test Coverage tab on the Apex Class record in Salesforce Setup.
Select and run the class on the Apex Test Execution page.
View the Code Coverage column in the list view on the Apex Classes page.
Question 21: Correct
What should be used to create scratch orgs?
Workbench
Salesforce CLI(Correct)
• Sandbox refresh
• Developer Console
Question 22: Correct
A
developer wants to mark each Account in a List<Account> as either Active or Inactive
based on the Last Modified Date field value being more than 90 days. Which Apex
technique should the developer user?
• A Switch statement, with a for loop inside.
A for loop, with an if/else statement inside. (Correct)
• An iflelse statement, with a for loop inside.
• for loop, witha switch statement inside.
A
Question 23: Correct
What is the maximum number of S0QL queries used by the following code?
= (SELECT
List<Account> aist Id FROM Account LIMIT 5]:
for (Account a : aList) {
List<Contact> cList = (SELECT Id FROM Contact WHERE AccountId = :a.Id) :
5
1
2
6(Correct)
Question 24: Correct
A
custom picklist field, Food_Preferencec, exist on a custom object. The picklist
contains the following options: Vegan, 'Kosher', 'No Preference'. The developer must
ensure a value is populated every time a record is created or updated. What is the most
efficient way to ensure a value is selected every time a record is saved?
• Mark the field as Required on the object's page layout.
Set 'Use the first value in the list as the default value' as True.
• Mark the field as Required on the field definition.(Correct)
Set a validation rule to enforce a value is selected.
Question 25: Correct
A
developer has to identify a method in an Apex class that performs resource-intensive
actions in memory by iterating over the result set of a S0QL 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?
Choose 2 answers.
• Use Partial DML statements to ensure only valid data is committed.
Use the Database.Savepoint method to enforce database integrity.(Correct)
Use the (@ReadOnly annotation to bypass the number of rows returned by a
SOQL.
Use the System.Limit class to monitor the current CPU governor limit
consumption.(Correct)
Question 26: Correct
What is the value of the Trigger.old context variable in a Before Insert trigger?
• An empty list of sObjects
Null(Correct)
Undefined
A list of newly created sObjects without IDs
Question 27: Correct
How should a developer write unit tests fora private method in an Apex class?
Use the Test Visible annotation.(Correct)
Mark the Apex class as global.
• Use the See All Data annotation.
Add a test method in the Apex class.
Question 28: Correct
Consider the following code snippet:
public static void insertAccounts (List<Account> theseAccounts) {
for (Account thisAccount: theseAccounts) {
if (thisAccount.website == null) {
thisAccount.website = "https://www.demo.com':
update theseAccounts;
When the code executes, a DML exception is thrown.
How should the developer modify the code to ensure exceptions are handled gracefully?
Remove null items from the list of Accounts
Implement the upsert DML statement.
Implement a try/catch block for the DML.(Correct)
Implement Change Data Capture.