Summer PD-1 Final Set
Summer PD-1 Final Set
A developer writes a single trigger on the Account object on the after insert and after update
events. A workflow rule modifies a field every time an Account is created or updated.
How many times will the trigger fire if a new Account is inserted, assuming no other automation logic is
implemented on the Account?
A.4
B.1
C.2
D.8
3 of 65. 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?
7 of 65. 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?
A. By writing an After Update trigger and accessing the field value from Trigger.old
B. By writing an After Insert trigger and accessing the field value from Trigger.old
C. By writing a Before Insert trigger and accessing the field value from Trigger.new
D. By writing a Before Update trigger and accessing the field value from Trigger.new
8 of 65. The values "High", "Medium', and 'Low' are identified as common values for multiple pickicts 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?
A. Create the Picklist on each object and use a Global Picklist Value Set containing the values.
B. Create the Picklist on each object as a required field and select "Display values alphabetically, not in the
order entered".
C. Create the Picklist on each object and select "Restrict picklist to the values defined in the value set.
D. Create the Picklist on each object and add a validation rule to ensure data integrity.
15 of 65. A developer receives an error when trying to call a global server-side method using the
@remoteAction decorator.
18 of 65. What are three considerations when using the @InvocableMethod annotation in Apex?
Choose 3 answers
B. Only one method using the @invocableMethod annotation can be defined per Apex class.
C. A method using the invocableMethod annotation can have multiple input parameters.
23 of 65. What will be the output in the debug log in the event of a QueryException during a call to the
aQuery method in
class myclass {
Account theAccount;
cry
ayaten.debug('Querying Accounts.");
system.debug('Custom Exception.');
finally (
system.debug("Done.");
return theAccount:
What occurs when more than one Account is returned by the SOQL query?
A. Use the Open Execute Anonymous feature on the Developer Console to run an insert Contact DML
statement.
B. Use Deploy from the VSCode IDE to deploy an insert Contact Apex class.
C. Use the Test menu on the Developer Console to run all test classes for the Contact trigger.
D. Use the New button on the Salesforce Contacts Tab to create a new Contact record.
50 of 65. What are three capabilities of the <1tng:require> tag when loading JavaScript resources in Aura
components?
Choose 3 answers
54 of 65. 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?
58 of 65. A custom picklist field, Food Preference, exists on a custom object. The pickdist 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?
B. Set "Use the first value in the list as the default value" as True.
59 of 65. developer creates a Apex trigger with helper dass, writes a test class that exercises coverage of
the Apex helper class.
Change Set deployment production fails with the coverage warning: "Test coverage selected Apex Trigger
is 0%, at least 1% coverage required."
What should developer do successfully deploy the Apex trigger helper class?
A. A custom field, Link__c, on the standard Contact object that looks up to an Account or a Campaign
C. The LeadId and ContactId fields on the standard Campaign Member ▶bject
D. The WhatId field on the standard Event object
2 of 65. 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?
LA. Create the Picklist on each object and add a validation rule to ensure data integrity.
B. Create the Picklist on each object and select "Restrict picklist to the values defined in the value set".
C. Create the Picklist on each object and use a Global Picklist Value Set containing the values.
D. Create the Picklist on each object as a required field and select "Display values alphabetically, not in the
order entered".
A. Workbench
B. Developer Console
C. Salesforce CLI
D. Sandbox refresh
4 of 65. 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 calculaceBodyFat() is accessible outside the package
namespace?
A. Decare the class and method using the public access modifier.
B. Declare the class as public and use the global access modifier on the method.
C. Declare the class and method using the global access modifier.
D. Declare the class as global and use the public access modifier on the method.
5 of 65. When using SalesforceDX, what does a developer need to enable to create and manage scratch
orgs?
A. Sandbox
B. Dev Hub
C. Environment Hub
D. Production
6 of 65. 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?
A. Use the schema describe calls to determine if the logged-in user has access to the Account object.
D. Use the serinfo Apex class to filter all SOQL queries to returned records owned by the logged-in user.
7 of 65. 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?
A. Database.insert(records, true)
B. Database.insert(records, false)
D. insert records
8 of 65. Which two are phases in the Aura application event propagation framework?
Choose 2 answers
A. Emit
B. Default
C. Bubble
D. Control
9 of 65. 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?
Choose 3 answers
A. To View Debug Logs, "Manager Users" or "View All Data" permission is needed.
B. Debug Log levels are cumulative, where FINE log level includes all events logged at the DEBUG, INFO,
WARN, and ERROR levels.
C.To View Debug Logs, "Manager Users" or "Modify All Data" permission is needed.
E. Amount of information logged in the debug log can be controlled by the log levels.
12 of 65. Which three code lines are required to create a Lightning component on a Visualforce page?
Choose 3 answers
A. $Lightning.useComponent
B. $Lightning.createComponent
C. <apex:slds/>
D. capex: includelightning/>
E. $Lightning.use
What occurs when more than one Account is returned by the SOQL query?
14 of 65. How can a developer check the test coverage of active Process Builders and Flows before
deploying them in a Change Set?
Choose 3 answers
17 of 65. When importing and exporting data into Salesforce, which two statements are true?
Choose 2 answers
B. Bulk API can be used to bypass the storage limits when importing large data volumes in development
environments.
D. Bulk API can be used to import large data volumes in development environments without bypassing the
storage limits.
18 of 65. 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?
21 of 65. Which two characteristics are true for Aura component events?
Choose 2 answers
A. If a container component needs to handle a component event, add a includeFacets="crue" attribute to its
handler.
D. Depending on the current propagation phase, calling event.stopPropagation () may not stop the event
propagation.
22 of 65. Which process automation should be used to send an outbound message without using Apex
code?
A. Workflow Rule
B. Flow Builder
C. Strategy Builder
D. Process Builder
23 of 65. Universal Containers wants to assess the advantages of declarative development versus
programmatic customization for specific use cases in its Salesforce implementation.
Choose answers
public customCtrir() {
WHERE Id ApexPages.currentPage().getParameters().get("id")]:
The value of the account type field is not being displayed correctly on the page. Assuming the custom
controller is property referenced on the Visualforce page, what should the developer go to correct the
problem?
25 of 65. 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?
Choose 2 answers
26 of 65. What is a fundamental difference between a Master-Detail relationship and a Lookup relationship?
B. In a Master-Detail relationship, when a record of a master object is deleted, the detail records are not
deleted.
C. In a Lookup relationship when the parent record is deleted, the child records are always deleted.
D. A Master-Detail relationship detail record inherits the sharing and security of its master record.
A. @AuraEnabled
B. @RestResource
C. @RemoteAction
D. @HttpInvocable
public void dowork(Account acct){ for (Integer i=0; i <= 200; i++){ insert acct;
B. 1 Account is inserted.
29 of 65. Which two statements accurately represent the MVC framework implementation in Salesforce?
Choose 2 answers
A. Records created or updated by triggers represent the Model (M) part of the MVC framework.
B. Lightning component HTML files represent the Model (M) part of the MVC framework.
C. Standard and Custom objects used in the app schema represent the View (V) part of the MVC
framework.
D. Validation rules enforce business rules and represent the Controller (C) part of the MVC framework.
30 of 65. Which three operations affect the number of times a trigger can fire?
Choose 3 answers
B. Lightning Flows
D. Workflow Rules
E. Email messages
32 of 65. 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?
A. By writing an After Update trigger and accessing the field value from Trigger.old
B. By writing a Before Update trigger and accessing the field value from Trigger.new
B. By writing a Before Insert trigger and accessing the field value from Trigger.new
D. By writing an After Insert trigger and accessing the field value from Trigger.old
34 of 65. Since Aura application events follow the traditional publish-subscribe model, which method is
used to fire an event?
A. fire()
B. fireEvent()
C. emit()
D. registerEvent()
36 of 65. A developer needs to implement the functionality for a service agent to gather multiple pieces of
information
A. Flow Builder
B. Process Builder
C. Lightning Component
D. Approval Process
37 of 65. A developer wants to mark each Account in a List<Account> as either Active or Inactive based on
the LastModifiedDate field value being more than 90 days.
Choose 2 answers
A. Fields that are used in a formula field can be deleted or edited without editing the formula.
D. Formulas are calculated at runtime and are not stored in the database.
39 of 65. Which exception type cannot be caught?
A. CalloutException
B. LimitException
C. A Custom Exception
D. NoAccessException
41 of 65. A recursive transaction is initiated by a DML statement creating records for these two objects:
• Accounts
. Contacts
A. The transaction succeeds and all changes are committed to the database.
B. The transaction fails and all the changes are rolled back.
C. The transaction fails only if the Contact trigger stack depth is greater or equal to 16.
D. The transaction succeeds as long as the Contact trigger stack depth is less than 16.
42 of 65. A developer must create a ShippingCalculator dass that cannot be instantiated and must include a
working default implementation of a calculate method, that sub-classes can override.
43 of 65. A Lightning component has a wired property, searchResults, that stores a list of Opportunities.
Which definition of the Apex method, to which the searchResults property is wired, should be used?
A. @AuraEnabled(cacheable=true)
B. @AursEnabled (cacheable=false)
C. @AuraEnabled (cacheable=true)
D. @AuraEnabled (cacheable=false)
44 of 65. 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
A. Process Builder
B. Workflow Rule
C. Approval Process
D. Flow Builder
46 of 65. Which two statements are true about Getter and Setter methods as they relate to Visualforce?
Choose 2 answers
A. There is no guarantee for the order in which Getter or Setter methods are executed.
B. Setter methods can pass a value from a controller to a page.
47 of 65. A custom picklist field, Food Preference ___c, exists 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?
D. Set Use the first value in the list as the default value as True.
48 of 65. What are two ways that a controller and extension can be specified for a custom object named
Notice on a Visualforce page?
Choose 2 answers
C apex:page=Notice extends="myControllerExtension"
49 of 65. Which statement generates a list of Leads and Contacts that have a field with the phrase 'ACME?
A. List<List <sObject>> searchList = [SELECT Name, ID FROM Contact, Lead WHERE Name 11ke
ACME'];
B. List<List <s0bject>> searchList = [FIND ACME" IN ALL FIELDS RETURNING Contact, Lead];
C. List <sObject> searchList = [FIND "+ACME IN ALL FIELDS RETURNING Contact, Lead];
D. Map <sObject> searchList = [FIND "ACHE IN ALL FIELDS RETURNING Contact, Lead);
50 of 65. An Apex method, getAccounts, that returns a List of Accounts given a searchTerm, is available for
Lightning Web components to use.
What is the correct definition of a Lightning Web component property that uses the getAccounts method?
51 of 65. Which code in a Visualforce page and/or controller might present a security vulnerability?
52 of 65. A developer wrote Apex code that calls out to an external system.
53 of 65. What are three capabilities of the <1tng: require> tag when loading JavaScript resources in Aura
components?
Choose 3 answers
54 of 65. A developer
. Calculate the line amount for each Line Item based on quantity selected and price.
A. Line Item has a Lookup field to Order and there can be many Orders per Line Items.
B. Order has a Lookup field to Line Item and there can be many Line Items per Order.
C. Line Item has a Master-Detail field to Order and the Master can be re-parented.
D. Order has a Master-Detail field to Line Item and there can be many Line Items per Order.
55 of 65. What is the value of the Trigger.old context variable in a Before Insert trigger?
A. Undefined
B. null
56 of 65. If Apex code executes inside the execute() method of an Apex class when implementing the
Batchable interface, which two statement are true regarding governor limits?
Choose 2 answers
A. The Apex governor limits might be higher due to the asynchronous nature of the transaction.
B. The Apex governor limits are reset for each iteration of the execute () method.
C. The Apex governor limits are relaxed while calling the constructor of the Apex class.
D. The Apex governor limits cannot be exceeded due to the asynchronous nature of the transaction.
57 of 65. How should a custom user interface be provided when a user edits an Account in Lightning
Experience?
Choose answers
D. Only method using InvocableMethod annotation can defined per Apex class.
59 of 65. 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 a user-initiated action on the Opportunity detail
page. Example values are as follows:
. Name
• Amount
• Account
Which two methods should the developer implement to fulfill the business requirement?
Choose 2 answers
A. Create a Process Builder on the Opportunity object that executes an Apex immediate action to perform
the HTTP REST callout whenever the Opportunity is updated.
B. Create a Lightning component that performs the HTTP REST callout, and use a Lightning Action to
expose the component on the Opportunity detail page.
C. Create an after update trigger on the Opportunity object that calls a helper method using Future
(Callout-crue) to perform the HTTP REST callout.
D. 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.
60 of 65. 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.
Choose 2 answers
deleteExpense,
applyDefaultsToExpense,
validateExpense Update:
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
A. Unify the before insert and before update triggers and use Process Builder for the delete action.
B. Maintain all three triggers on the Expense object, but move the Apex logic out of the trigger definition.
C. Create helper classes to execute the appropriate logic when a record is saved.
D. Unify all three triggers in a single trigger on the Expense ___c object that includes all events.
Campaignid];
Example 2:
Aggregate Result() groupedResults - [SELECT CampaignId, AVG (Amount) theAverage FROM Opportunity
GROUP BY CampaignId); for (Aggregate Result ar: groupedResults)
Systen.debug Campaign ID' - az.get "CampaignId"); System. debug Average amount" - ar.get("the
Average"));
Example 3:
Carpalunidl;
Which two examples above use the System.debug statements to correctly display the results from the
SOQL aggregate queries?
Choose 2 answers
A. Example 1
B. Example 2
C. Example 3
D. Example 4
63 of 65. A team of many developers work in their own individual orgs that have the same configuration as
the production org.
A.
Developer Sandbox
B. Full Sandbox
C. Developer Edition
64 of 65. 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 developer use to ensure only users that should be able to delete Accounts can
successfully perform deletions?
A. accountRec.isDeletable ()
B. Schema.sObjectType.Account.13 Deletable()
C. accountRec.sObjectType.isDeleteable()
D. Account.isDeletable ()
65 of 65. 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?
A. @PreTest
B. @StartTest
C. @isTest(SeeAllData=true)
D. @TestSetup
-------------------------------------------------(set 3)-----------------------------------------------------------
1 of 65. Universal Containers wants Opportunities to no longer be editable when reaching the Closed/Won
stage.
2 of 65. Which Salesforce org has a complete duplicate copy of the production org including data and
configuration?
B. Production
C. Full Sandbox
3 of 65. The following Apex method is part of the ContactService class that is called from a trigger:
update thisContact;
How should the developer modify the code to ensure best practices are met?
update contacts:
Calculate the line amount for each Line Item based on quantity selected and price.
A. Order has a Master-Detail field to Line Item and there can be many Line Items per Order.
B. Order has a Lookup field to Line Item and there can be many Line Items per Order.
C. Line Item has a Master-Detail field to Order and the Master can be re-parented.
D. Line Item has a Lookup field to Order and there can be many Orders per Line Items.
5 of 65. A developer is implementing an Apex class for a financial system. Within 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?
Choose 2 answers
A. Use the final keyword and assign its value when declaring the variable.
B. Use the final keyword and assign its value in the class constructor.
C. Use the static keyword and assign its value in the class constructor.
D. Use the static keyword and assign its value in a static initializer.
B. Changing a user's default division when the transfer division option is checked
7 of 65. Universal Containers wants a list button to display a Visualforce page that allows users to edit
multiple records.
A. custom controller
B. <apex:listButton> tag
D. controller extension
8 of 65. A developer wants to invoke an outbound message when a record meets a specific criteria.
Choose 3 answers
A. Process Builder can be used to check the record criteria and send an outbound message without Apex
code.
B. Process Builder can be used to check the record criteria and then call Apex code.
C. Workflows can be used to check the record criteria and send an outbound message.
D. Flow Builder can be used to check the record criteria and send an outbound message without additional
code.
E. Approval Process has the capability to check the record criteria and send an outbound message without
Apex code.
9 of 65. A developer has an Apex controller for a Visualforce page that takes an ID as a URL parameter
10 of 65. In the following example, which sharing context will myMethod execute when it is invoked?
11 of 65. A developer needs to have records with specific field values in order to test a new Apex dass.
What should the developer do to ensure the data is available to the test?
12 of 65. Instead of sending emails to support personnel directly from Salesforce, Universal Containers
wants to notify an external system in the event that an unhandled exception occurs.
A. Publish the error event using the addError () method and have the external system subscribe to the
event using CometD.
B. Since this only involves sending emails, no publishing is necessary. Have the external system subscribe
to the event channel.
C. Publish the error event using the addError () method and write a trigger to subscribe to the event and
notify the external system.
D. Publish the error event using the Eventbus.publish() method and have the external system subscribe to
the event using CometD.
14 of 65. 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?
A. [SELECT id, (SELECT Id FROM Job Applications__r) FROM Contact WHERE Accounts. Industry =
'Technology'];
C. [SELECT Id, (SELECT Id FROM Job Applications__r ) FROM Contact WHERE Account.Industry =
'Technology'];
D. (SELECT Id, (SELECT id FROM Job Applications__c) FROM Contact WHERE Accounts.Industry
='Technology'];
for (Case thisCase: [SELECT Id, Status FROM Case LIMIT 50000]) {
casesToUpdate.add(thisCase);
try{
}catch (Exception e) {
What should a developer consider for an environment that has over 10,000 Case records?
16 of 65. 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?
A. Scratch orgs
B. Developer sandboxes
D. Developer orgs
17 of 65. Which statement describes the execution order when triggers are associated to the same object
and event?
A. @InvocableMethod
{ /*implementation*/ }
B. @InvocableMethod
{ /*implementation*/ }
C. @InvocableMethod
{/*implementation*/}
D. @InvocableMethod
{/*implementation*/}
Why should the developer choose to use Data Loader instead of Data Import Wizard?
20 of 65. Which two are best practices when it comes to Aura component and application event handling?
Choose 2 answers
A. Handle low-level events in the event handler and re-fire them as higher-level events.
C. Reuse the event logic in a component bundle, by putting the logic in the helper.
D. Use component events to communicate actions that should be handled at the application level.
Choose answers
A. Declarative customizations more flexibility to limits. Declarative customizations generate run time errors.
23 of 65. What are two ways a developer can get the status of an enqueued job for a dass that implements
the queueable interface?
Choose 2 answers
24 of 65. What is the result of the following code? Account a new Account(); Database.insert(a, false);
B. The record will be created and a message will be in the debug log.
25 of 65. How many Accounts will be inserted by the following block of code?
insert a:
A. 150
B. 100
C. 500
D. 0
26 of 65. Which three allow custom Scalable Vector Graphic to be included a Lightning web component?
Choose answers
27 of 65. An opportunity needs to have an amount rolled up from a custom object that is not in a
MAter/Detail relationship.
A. Write a trigger on the child object and use a red-black tree sorting to sum the amount for all related child
objects under the opportunity.
B. Write a trigger on the child object and use an aggregate function to sum the amount for all related child
objects under the opportunity.
C. Write a Process Builder that links the custom object to the Opportunity.
28 of 65. 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 e custom object.
29 of 65. A developer created these three Rollup Summary fields in the custom object, Project C:
Total Timesheets c
The developer is asked to create a new field that shows the ratio between rejected and approved
timesheets for a given project.
What are two benefits of choosing a formula field instead of an Apex trigger to fulfill the request?
Choose 2 answers
B. A test class that validates the formula field is needed for deployment.
C. A formula field will calculate the value retroactively for existing records.
30 of 65. 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 should the developer make in the Flow?
31 of 65. 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?
A. Add a Master-Detail field on the Global Address object to the Account object.
B. Add a Lookup field on the Account object to the Global Address object.
C. Add a Lookup field on the Global Address object to the Account object.
D. Add a Master-Detail field on the Account object to the Global Address object.
32 of 65. 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"?
A. FIND 'Universal Containers' IN Company Name Fields RETURNING lead(id, name), account(id, name),
contact(id, name)
B. SELECT lead(id, name), account(id, name), contact(id, name) FROM Lead, Account, Contact WHERE
Name = 'Universal Containers'
D. FIND 'Universal Containers' IN Name Fields RETURNING lead(id, name), account(id, name), contact(id,
name)
33 of 65. Flow Builder uses an Apex Action to provide additional information about multiple Contact, stored
in a custom class, ContactInfo.
Which is the correct definition of the Apex method that gets the additional information?
A. @InvocableMethod(label='Additional Info')
public List<ContactInfo> getInfo(List<Id> contactIds)
{/*implementation*/}
B. @InvocableMethod(label='Additional Info')
public List<ContactInfo> getInfo(Id contactId)
{/*implementation*/} @InvocableMethod(label='Additional Info')
public static List<ContactInfo> getInfo(List<Id> contactIds)
{/*implementation*/} this is the right option.
C. @InvocableMethod(label='Additional Info')
public List<ContactInfo> getInfo(List<Id> contactIds)
{/*implementation*/}
D. @InvocableMethod(label='Additional Info')
public List<ContactInfo> getInfo(List<Id> contactIds)
{/*implementation*/}
35 of 65. 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 SOQL statement on the account. The method performs DML statement to
save changes to the database.
Which two techniques should the developer implement as a best practice to ensure transaction control and
avoid exceeding governor limits?
A. Use the @ReadOnly annotation to bypass the number of rows returned by a SOQL.
Boolean isOK;
integer x;
x = 2:00;
x = 3;
} else {
x=4;
}
Based on this code, what is the value of x?
A. 3
B. 1
C. 4
D. 2
37 of 65. Which action causes a before trigger to fire by default for Accounts?
B. Importing data using the Data Loader and the Bulk API
38 of 65. Which three statements are true regarding custom exceptions in Apex?
Choose 3 answers
B. A custom exception class can extend other classes besides the Exception class.
C. A custom exception class name must end with "Exception".
39 of 65. A developer created a new trigger that inserts a Task when a new Lead is created. After deploying
to production, an outside integration that reads task records is periodically reporting errors.
Which change should the developer make to ensure the integration is not affected with minimal impact to
business logic?
Choose 2 answers
42 of 65. A developer must implement a CheckPayment Processor dass that provides check processing
payment capabilities that adhere to what is defined for payments in the Payment Processor interface.
Which is the correct implementation to use the Payment Processor interface class?
A. public class CheckPayment Processor implements Payment Processor (
43 of 65. 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.
45 of 65. 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?
A. Limits
B. Exception
C. Messaging
D. OrgLimits
46 of 65. 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?
A. The test method does not use System. runas to execute as a specific user.
48 of 65. A developer wants to get access to the standard price book in the org while writing a test dass that
covers an OpportunityLineItem trigger.
A. Use @IsTest (SeeAllData-tzue) and delete the existing standard price book.
C. Use @TestVisible to allow the test method to see the standard price book.
A. Long
B. Double
C. Integer
D. sObject
E. List
50 of 65. A developer has two custom controller extensions where each has a save() method.
Which save() method will be called for the following Visualforce page?
</apex:page>
C. ExtensionB save()
D. Extension A save()
51 of 65. Universal Containers wants to notify an external system, in the event that an unhandled exception
occurs, by publishing a custom event using Apex.
A. Have the external system subscribe to the event channel. No publishing is necessary.
B. Publish the error event using the addError() method and have the external system subscribe to the event
using CometD.
C. Publish the error event using the addError () method and write a trigger to subscribe to the event and
notify the external system.
D. Publish the error event using the Eventbus.publish() and have the external system subscribe to the event
using CometD.
52 of 65. A developer is tasked to perform a security review of the Contact Search Apex dass that exists in
the system. Within the class, the developer identifies the following method as a security threat:
return Database.query('SELECT id, FirstName, LastName FROM Contact WHERE LastName Like
X+lastName+"%");
What are two ways the developer can update the method to prevent a SOQL injection attack?
Choose 2 answers
A Use the @ReadOnly annotation and the with sharing keyword on the class.
B. Use variable binding and replace the dynamic query with a static SOQL.
C. Use the escapeSingleQuotes method to sanitize the parameter before its use.
53 of 65. 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?
C. <lightning-input-currency value="Salary_e"></lightning-input-currency>
54 of 65. Universal Containers 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 should not be
allowed to see the Line Items on the Order.
Which type of relationship should be used between Orders and Line Items?
A. Lookup
B. Master-Detail
C. Indirect Lookup
D. Direct Lookup
55 of 65. Universal Containers has an order system that uses an Order Number to identify an order for
customers and service agents. Order records will be imported into Salesforce.
A. Lookup
B. Indirect Lookup
D. Direct Lookup
56 of 65. Which Lightning code segment should be written to declare dependencies on a Lightning
component, c:accountList, that is used in a Visualforce page?
</aura: component>
B. <aura:application access="GLOBAL">
</aura:application>
</aura: application>
57 of 65. 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?
Choose 3 answers
A. Process Builder
B. Triggers
D. Roll-up summaries
E. Relationships
58 of 65. A developer must troubleshoot to pinpoint the causes of performance issues when a custom page
loads in their org.
B. Developer Console
C. Setup Menu
D. AppExchange
A. Calendar Events
C. Developer Log
61 of 65. A developer must create a CreditCardPayment class that provides an implemntation of an existing
Payment class.
62 of 65. 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?
B. Enable Available for Lightning Experience, Lightning Communities, and the mobile app on Visualforce
pages used by the custom application.
D. Incorporate the Salesforce Lightning Design System CSS stylesheet into the JavaScript applications.
63 of 65. 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 that deploys to a sandbox?
Choose 2 answers
B. Change. Sets
C. Developer Console
D. SFDX CLI
64 of 65. What are three ways for a developer to execute tests in an org?
Choose 3 answers
A. SalesforceDX
B. Metadata API
C. Bulk API
D. Setup Menu
E. Tooling API
65 of 65. An Approval Process is defined in the Expense_Item_c object. A business rule dictates that
whenever a user changes the Status to 'Submitted on an Expense Report c record, all the Expense Item
crecords related to the expense report must enter the approval process individually.
A. Create a Process Builder on Expense_Report_c with a 'Submit for Approval action type to submit all
related Expense Item c records when the criteria is met.
B. Create a Process Builder on Expense Report_c with an Apex' action type to submit all related Expense
Item___e records when the criteria is met.
C. Create a Process Builder on Expense Report to mark the related Expense_item_c as submittable and a
trigger on Expense_item_cito submit the records for approval.
D. Create two Process Builders, one on Expense Report to mark the related Expense_Item_cas submittable
and the second on Expense cene to submit the records for approval.