PD1 SP22
PD1 SP22
PD1 SP22
1) 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
A. SFDX CLI ✅
B. Change Sets
C. VSCode ✅
D. Developer Console
2)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 Supporte records to a single Opportunity record.
Additionally, aggregate information about the Engineering Support records should be shown on the
Opportunity record.
D. ApexPages.currentPage().getParameters ().get('url_param').escapeHtm14() ✅
5)A developer must create a ShippingCalculator class that cannot be instantiated and must include a
working default implementation of a calculate method, that sub-classes can override.What is the correct
implementation of the ShippingCalculator class?
6) The Salesforce Administrator created a custom picklist field Account Status_c, on the Account object.
This picklist has possible values of "Inactive" and "Active". As part of a new business process,
management wants to ensure an opportunity record is created only for Accounts marked as Active. A
developer is asked to implement this business requirement.
A.Entitlement Process
B. Salesforce Flow✅
C. Outbound Messaging
D. Approval Process
7) Universal Containers wants a list button to display a Visualforce page that allows users to edit
multiple records.
A. controller extension
C. <apex:11stButton> tag
D. custom controller
8)Flow Builder uses an Apex Action to provide additional information about multiple Contacts, stored in
a custom class, Contact Into.
Which is the correct definition of the Apex method that gets the additional information?
{ /*implementation" }
[/implementation"] ✅
C. @ InvocableMethod(label-Additional Incot)
1/implementation/1
B. Use #TestVisible to allow the test method to see the standard price book.
10) 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
A. Developer Console
C. SFDX CLI ✅
D. Change Sets
12)When using SalesforceDX, what does a developer need to enable to create and manage scratch orgs?
A. Environment Hub
B. Production
C. Dev Hub ✅
D. Sandbox
13)What does the Lightning Component framework provide to developers?
A. @RemoteAction
B. @RestResource ✅
C. @HttpInvocable
D. @AuraEnabled
15)What is the value of the Trigger.old context variable in a before insert trigger?
A. null ✅
D. Undefined
PD1 14-04-2022
1) A developer must create a CreditCerdPayment class that provides an implementation of an existing
Payment class.
public virtual class Payment I public virtual void makePayment (Decimal amount) {implementation/ }
Imp 2) Where are two locations a developer can look to find information about the status of batch or
future methods?
Choose 2 answers
B. Developer Console
D. Apex Jobs ✅
3) A recursive transaction is initiated by a DML statement creating records for these two objects:
• Accounts
• Contacts
Within the transaction, the Account trigger hits a stack depth of 16.
A. The Account records are rolled back and the Contact records are committed.
B. The transaction succeeds and all changes are committed to the database. ✅
C. The transaction fails and all the changes are rolled back.
D. The transaction fails only if the Contact trigger stack depth is greater or equal to 16.
4) A third-party vendor created an unmanaged Lightning web component. The Salesforce Administrator
wishes to expose the component only on Record Page Layouts.
Which two actions should the developer take to accomplish this business objective?
Choose 2 answers
A. A Custom Exception
B. LimitException ✅
C. NoAccessException
D. CalloutException
6)Which code in a Visualforce page and/or controller might present a security vulnerability?
A. <Apex:outputField value="fctrl.userInput)" />
7)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?
Choose 2 answers
8)Universal Containers (UC) uses a custom object called Vendor. The Vendor custom object has master-
detail relationship with the standard Account object.
Based on some internal discussions, the UC administrator tried to change the master-detail relationship
to a lookup relationship, but was not able to do so.
A. Some of the Vendor records have null for the Account field.
B. The Account object has a roll-up summary field on the vendor object. ✅
C. The Account object does not allow changing a field type for a custom field.
if (RequestLogic.isVelid (Request__c)
RequestLogic.validateRecords trigger.newl:
if (RequestLogic.isValid(Request_c
RequestLogic.validateRecords (tragger.new ✅
10) 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 Postal CodeToTimezone_c.
B. The LeadId and ContactId fields on the standard Campaign Member object
12) A credit card company needs to implement the functionality for a service agent to process damaged
or stolen credit cards. When the customers call in, the service agent must gather many pleces of
information. A developer is tasked to implement this functionality.
What should the developer use to satisfy this requirement in the most efficient manner?
A. Lightning Component
B. Apex Trigger✅
C. Approval Process
D. Flow Builder
13) Which two statements are true about getter and setter methods as they relate to Visualforce?
Choose 2 answers
A. Getter methods must be named get Variable and setter methods must be named setVariable.
14) The Salesforce Administrator created a custom picklist field Account Status_c, on the Account object.
This picklist has possible values of "Inactive" and "Active". As part of a new business process,
management wants to ensure an opportunity record is created only for Accounts marked as Active. A
developer is asked to implement this business requirement.
which automation tool should be used to fulfill the business need?
A. Entitlement Process
B. Salesforce Flow ✅
C. Outbound Messaging
D. Approval Process
15) What should a developer use to script the deployment and unit test execution as part of continuous
integration?
A. Developer Console
B. Execute Anonymous
C. Salesforce CLI ✅
D. VS Code
16) An Opportunity needs to have an amount rolled up from a custom object that is not in a master-
detail relationship.
A. Write a trigger on the Opportunity object and use an aggregate function to sum the amount for all
related child objects under the Opportunity.
D. Write a trigger on the child object and use an aggregate function to sum the amount for all related
child objects under the Opportunity. ✅
17) A lead developer creates an Apex interface called "Laptop". Consider the following code snippet:
How can a developer use the Laptop interface within the SilverLaptop class?
A. (Extende (class="Laptop"}
B. Interface (class="Laptop")
insert a;
A.. 0 ✅
B. 150
C. 100
D. 500
19) 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 Application_c) FROM Contact WHERE Account. Industry -
'Technology']:
B. [SELECT id, (SELECT id FROM Job_Applications c) FROM Contact WHERE Accounts. Industry
Technology']:
C. (SELECT id, (SELECT Id FROM Job Applications_r) FROM Contact WHERE Accounts. Industry -
'Technology 1:
D. (SELECT Id, (SELECT Id FROM Job Applications_r) FROM Contact WHERE Account. Industry -
"Technology'1; ✅
20) A Primarytd_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?
22) What are three capabilities of the <itng:require> tag when loading JavaScript resources in Aura
components?
Choose 3 answers
A. Loading files from Documents
23) 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?
24) 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?
Choose 2 answers
25) How should a developer write unit tests for a private method in an Apex class?
26) Universal Containers has a support process that allows users to request support from its engineering
team using a custom object, Engineering Support_o
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.
for (Case thisCase: SELECT id, Status FROM Case LIKIT 500003 thisCase.Status Working":
casesToUpdate.add(thisCase):
tryl
System.debug (e.getMessage());
What should a developer consider for an environment that has over 10,000 Case records?
A. The try-catch block will handle exceptions thrown by governor limits.
28) 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.
D. Fire a notification.
Choose 2 answers
B. Formulas are calculated at runtime and are not stored in the database. ✅
C. Fields that are used in a formula field can be deleted or edited without editing the formula.
30) A developer wants to mark each Account in a Listdaccount> as either Active or Inactive, based on
the value in the LastModifiedDate field of each Account being greater than 90 days in the past.
31) Universal Hiring is using Salesforce to capture job applications. A salesforce administrator created
two custom objects; Job_ acting as the master object, Job Application_o acting as the detail.
Within the Job __c object, a custom multi-select picklist, Preferred Locations, contains a list of approved
states for the position. Each Job Application_c record relates to a Contact within the system through a
master- detail relationship.
Recruiters have requested the ability to view whether the Contact's Mailing State value matches a value
selected on the Preferred Locations_c field, within the Job Application_c record. Recruiters would like
this value to be kept in sync, if changes occur to the Contact's Mailing State or if the Job's Preferred
Locations_e field is updated.
What is the recommended tool a developer should use to meet the business requirement?
A. Record-triggered flow
B. Apex trigger ✅
C. Process Builder
D. Formula field
32) A developer migrated functionality from JavaScript Remoting to a Lightning web component and
wants to use the existing getOpportunities () method to provide data.
if(thisAccount.website -- null)
thisAccount.webaice - "https://www.demo.com:
update theseAccounts:
How should the developer modify the code to ensure exceptions are handled gracefully? -
C. The record will be created and a message will be in the debug log.
35) An Approval Process is defined in the Expense Icen object. A business rule dictates that whenever a
user changes the Status to 'Submitted' on an Expense_Report_c record, all the Expense Item_c records
related to the expense report must enter the approval process individually.
A developer is asked to explore if this automation can be implemented without writing any Apex code.
36) The OrderHelper class is a utility class that contains business logic for processing orders. Consider
the following code snippet:
//code implementation
A developer needs to create a constant named DELIVERY_MULTIPLIER with a value of 4.15. The value of
the constant should not change at any time in the code.
How should the developer declare the DELIVERY MULTIPLIER constant to meet the business objectives?
B. <apex:page contentType=application/pdf">
C. <apex:page.renders-"application/pdf">
D. <apex:page renderAs="pdf"> ✅
38) 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.
Choose 3 answers
A. List ✅
B. Integer ✅
C. Double
D.Long
E. sObject ✅
40) Which statement describes the execution order when triggers are associated to the same object and
event?
41) Managers at Universal Containers want to ensure that only decommissioned containers are able to
be deleted in the system. To meet the business requirement a Salesforce developer adds
"Decommissioned" as a picklist value for the Status_c custom field within the Container_c object.
Which tool should the developer use to enforce only Container records with a status of
"Decommissioned" can be deleted?
A. Apex trigger
C. Validation rule ✅
Which two tools should the developer use to meet the business requirement and ensure low
maintenance of the solution?
Choose 2 answers
A Apex trigger ✅
B. Record-Triggered flow
C. Apex callouts ✅
D. Platform event
43) Which three code lines are required to create a Lightning component on a Visualforce page?
Choose 3 answers
A. <apex:slds/>
B. @Lightning.createComponent ✅
C. <apex:includeLightning/> ✅
D. @Lightning.use ✅
E. @Lightning.useComponent
44) Universal Containers wants a list button to display a Visualforce page that allows users to edit
multiple records.
A. controller extension
C. <apex:listButton> tag
D. custom controller
45) A developer creates a custom exception as shown below:
What are two ways the developer can fire the exception in Apex?
Choose 2 answers
46) When importing and exporting data into Salesforce, which two statements are true?
Choose 2 answers
B. Bulk API can be used to import large data volumes in development environments without bypassing
the storage limits. ✅
C. Bulk API can be used to bypass the storage limits when importing large data volumes in development
environments.
return active:
if (sfetcher.isActive())
The StatusFetcher class successfully compiled and saved. However, the Calculator class has a compile
time
error.
A. Change the class declaration for the Calculator dass to public with inherited sharing.
D. Change the class declaration for the StatusFetcher class to public with inherited sharing.
48) 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 inputs 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?
Choose 3 answers
B. ApexPages.currentPage().getParameters().put('input, TestValue'); ✅
C. insert pageRef;
D. Test.setCurrentPage(pageRef); ✅
Why did the method fail in the sandbox test framework but succeed in the Developer Console?
B. The test method does not use System.runks to execute as a specific user.
50) What are two ways for a developer to execute tests in an org?
Choose 2 answers
A. Bulk API
B. Developer Console ✅
C. Tooling API ✅
D. Metadata API
51) A team of many developers work in their own individual orgs that have the same configuration as
the production org.
A. Developer Edition
B. Full Sandbox
D. Developer Sandbox ✅
52) Which two process automations can be used on their own to send Salesforce Outbound Message?
Choose 2 answers
A. Workflow Rule ✅
B. Process Builder
C. Flow Builder ✅
D. Strategy Builder
53) A developer created a weather app that contains multiple Lightning web components.
One of the components, called Toggle, has a toggle for Fahrenheit or Celsius units. Another component,
called Temperature, displays the current temperature in the unit selected in the Toggle component.
When a user toggles from Fahrenheit to Celsius or vice versa in the Toggle component, the information
must be sent to the Temperature component so the temperature can be converted and displayed.
54) A developer wants to get access to the standard price book in the org while writing a test class that
covers an OpportunityLineltem trigger.
A. Use @IsTest (SecAllDate-true) and delete the existing standard price book.
B. Use @TestVisible to allow the test method to see the standard price book.
55) A large corporation stores Orders and Line Items in Salesforce for different lines of business. Users
are allowed to see Orders across the entire organization, but, for security purposes, should only be able
to see the Line Items for Orders in their line of business.
Which type of relationship should be used between Line Items and Orders?
A. Lookup
B. Direct Lookup
C. Master-Detall ✅
D. Indirect Lookup
56) In the following example, which sharing context will nyttethod execute when it is invoked?
57) 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?
C. Use the UserInfo Apex class to filter all SOQL queries to returned records owned by the logged-in user.
D. Use the schema describe calls to determine if the logged-in user has access to the Account object.
58) A developer writes a trigger on the Account object on the before update event that increments a
count field. A workflow rule also increments the count field every time that an Account is created or
updated. The field update in the workflow rule is configured to not re-evaluate workflow rules.
What is the value of the count field if an Account is inserted with an initial value of zero, assuming no
other automation logic is implemented on the Account?
A. 1
B. 2✅
C. 4
D. 3
Pd1 set3 updated
1) A developer is building custom search functionality that uses SOSL to search account and contact
records that match search terms provided by the end user. The feature is exposed through a Lightning
web component, and the end user is able to provide a list of terms to search.
@AuraEnabled
for (String term: tertist) ( result.addA11([FIND :tern IN ALL FIELDS BETURNING Account (Name),
return result;
What is the maximum number of search terms the end user can provide to successfully execute the
search without exceeding a governor limit?
A. 20
B. 150
C. 200
D. 2,000 ✅
2) 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?
A. SELECT Id, (SELECT Id FROM Trainer_c) FROM Gym_c WHERE Name = 'Viridian City Gym'
D. SELECT Id, (SELECT Id FROM Trainers_r) FROM Gym_ WHERE Name = 'Viridian City Gym' ✅
3)Which three operations affect the number of times a trigger can fire?
Choose 3 answers
B. Email messages
C. Lightning Flows✅
D. Workflow Rules ✅
• Calculate the line amount for each Line Item based on quantity selected and price.
5) 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=false)
C. @AuraEnabled(cacheable=true)
D. @AuraEnabled (cacheable=true) ✅
6) 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?
7) Universal Containers uses a Master-Detail relationship and stores the availability date on each Line
Item of an Order and Orders are only shipped when all of the Line Items are available.
Which method should be used to calculate the estimated ship date for an Order?
A. Use a DAYS formula on each of the availability date fields and a COUNT Roll-Up Summary field on the
Order.
C. Use a MAX Roll-Up Summary field on the latest availability date fields. ✅
8) Since Aura application events follow the traditional publish-subscribe model, which method is used to
fire an event?
A. emit()
B. fireEvent()
C. registerEvent()
D. fire() ✅
9) 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?
10) What can be used to override the Account's standard Edit button for Lightning Experience?
A. Lightning action
B. Lightning component ✅
C. Lightning page
D. Lightning flow
11) A developer needs to join data received from an integration with an external system with parent
records in Salesforce. The data set does not contain the Salesforce IDs of the parent records, but it does
have a foreign key attribute that can be used to identify the parent.
Which action will allow the developer to relate records in the data model without knowing the
Salesforce ID?
C. Create and populate a custom field on the parent object marked as Unique.
12) 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. Developer sandboxes
B. Scratch orgs ✅
D. Developer orgs
13 ) A developer must modify the following code snippet to prevent the number of SOQL queries Issued
from exceeding the platform governor limit.
:thisOppid]):
return oppLineItems:
The above method might be called during a trigger execution via a Lightning component.
B. Use the Systen.Limits.getlistQueries () method to ensure the number of queries is less than 100.
C. Use the Systen.Limits.getQueries!) method to ensure the number of queries is less than 100.
D. Refactor the code above to perform the SOQL query only if the set of opportunitylds contains less 100
10s.
14) Which two settings must be defined in order to update a record of a junction object?
Choose 2 answers
15) Given the following code snippet, that is part of a custom controller for a Visualforce page:
tryl
update thisContact;
catch (Exception e) {
String errorMessage = 'An error occurred while updating the Contact. ee.getMessage());
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?
Choose 2 answers
A Use 11 (Schema.s0bjectType.Contact.isaccessible())
B. Use if(thisContact.OwnerIdUserInfo.gett
D. Use if (Schems.objectType.Contact.isUpdateable()) ✅
16) What are three ways for a developer to execute tests in an org?
Choose 3 answers
A. SalesforceDX ✅
B. Bulk API
C. Metadata API
D. Setup Menu ✅
E. Tooling API✅
Integer x = 0;
do t
x = 1;
} while (x1);
System.debug (x);
A. 0
B. 1
C. 2 ✅
D. 3
18) 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?
B. Quick action
C. Apex trigger
D. Formula field
19) Which code should be used to update an existing Visualforce page that uses standard Visualforce
components so that the page matches the look and feel of Lightning Experience?
A. <apex:page lightningStyleSheets="true">
B.<apex: includeLightning/>
C. <apex:slds/> ✅
20) What are two use cases for executing Anonymous Apex code?
Choose 2 answers
21) A developer wants to invoke an outbound message when a record meets a specific criteria.
A. Flow Builder can be used to check the record criteria and send an outbound message. ✅
B. Next Best Action can be used to check the record criteria and send an outbound message.
C. Entitlement Process can be used to check the record criteria and send an outbound message without
Apex code.
D. Approval Process can be used to check the record criteria and send an outbound message without
Apex code. ✅
22) The following code snippet is executed by a Lightning web component in an environment with more
than 2,000 lead records:
@AuraEnabled
for (Lead thisLead: [SELECT Origin_c FROM Lead]) { thisLead. LeadSource= thislead.Origin; update
thisLead:
Which governor limit will likely be exceeded within the Apex transaction?
23) A developer receives an error when trying to call a global server-side method using the
@remateAction decorator.
Choose 2 answers
A. Before-save flow ✅
B. Approval process
C. Quick actions
D. Account trigger ✅
• Defect_c: a custom object to represent known issues with the company's software
• Case_Defect_c: a junction object between Case and Defect_c to represent that a defect is a cause of a
customer issue
26) 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.
27) A business implemented a gamification plan to encourage its customers to watch some educational
videos.
Customers can watch videos over several days, and their progress is recorded. Award points are granted
to customers for all completed videos. When the video is marked as completed in Salesforce, an
external web service must be called so that points can be awarded to the user.
A developer implemented these requirements in the after update trigger by making a call to an external
web service. However, a System.CalloutException is occurring.
C. Surround the external call with a try-catch block to handle the exception.
28) A developer must troubleshoot to pinpoint the causes of performance issues when a custom page
loads in their org..
B. Developer Console ✅
C. AppExchange
D. Setup Menu
29) Given the following Apex statement:
What occurs when more than one Account is returned by the SOQL query?
30) 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.
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?
Choose 2 answers
A. Move the DML that saves opportunities outside the for loop.✅
B. Use Database. query to query the opportunities.
C. Check if all the required fields for Opportunity are being added on creation.
deleteExpense,
applyDefaultsToExpense, validateExpenseUpdate:
The triggers process before delete, before insert, and before update events respectively.
Which two techniques should the developer implement to ensure trigger best practices are followed?
Choose 2 answers
A. Unify the before insert and before update triggers and use Flow for the delete action.
B. Unify all three triggers in a single trigger on the Expense_c object that includes all events. ✅
C. Create helper classes to execute the appropriate logic when a record is saved. ✅
D. Maintain all three triggers on the Expense e object, but move the Apex logic out of the trigger
definition.
32) 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?
A. Account.isDeletable ()
B. accountRec.sObjectType.isDeletable()
C. accountRec.isDeletable()
D. Schems.s0bjectType.Account.isDeletable() ✅
33) Refer to the following code snippet for an environment that has more than 200 Accounts belonging
to the Technology industry:
for (Account thisAccount : [Select Id, Industry FROM Account LIMIT 250]){ if(thisAccount. Industry
Technology'){
update thisAccount;
When the code executes, what happens as a result of the Apex transaction?
A. The Apex transaction fails regardless of the context of execution by exceeding the DML governor limit.
✅
B. If executed in an asynchronous context, the Apex transaction is likely to fail by exceeding the DML
governor limit.
C. If executed in a synchronous context, the Apex transaction is likely to fail by exceeding the DML
governor limit.
D. The Apex transaction fails with the following message: sobject zow was retrieved via SOOL without
querying the requested field: Account.Is Tech_c.
34) 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 fulfill the business requirement?
Choose 2 answers
A. Create a Remote Action on the Opportunity object that executes an Apex immediate action to
perform the HTTP REST callout whenever the Opportunity is updated.
B. Create an after update trigger on the Opportunity object that calls a helper method using @Future
(Callout=true) to perform the HTTP REST callout.
C. 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. ✅
D. Create a Lightning component that performs the HTTP REST callout, and use a Lightning Action to
expose the component on the Opportunity detail page. ✅
35) A developer needs to allow users to complete a form on an Account record that will create a record
for a custom object. The form needs to display different fields depending on the user's job role. The
functionality should only be available to a small group of users.
Choose 3 answers
36) Which three statements are true regarding custom exceptions in Apex?
Choose 3 answers
D. A custom exception class can extend other classes besides the Exception class.
37) 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?
A. 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.
✅
38) 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 static keyword and assign its value in the class constructor.
B. Use the final keyword and assign its value in the class constructor. ✅
C. Use the final keyword and assign its value when declaring the variable. ✅
D. Use the static keyword and assign its value in a static initializer.
39) 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.
Choose 2 answers
A. The field values on the master record are overwritten by the records being merged.
B. 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. ✅
A. @InvocableMethod
{/implementation*/ }
B. @InvocableMethod
implementation /
C. @InvocableMethod
[/implementation*/ }
D. @InvocableMethod
{ /*implementation/]. ✅
41) Which three Salesforce resources can be accessed from a Lightning web component?
Choose 3 answers
C. SVG resources ✅
E. Static resources ✅
42) 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?
A. Declare the class as public and use the global access modifier on the method.
B. Declare the class as global and use the public access modifier on the method.
C. Declare the class and method using the global access modifier. ✅
D. Declare the class and method using the public access modifier.
43) Which 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?
A. Entitlement Rules
B. Flow Builder ✅
C. Approval Process
D. Lightning Component
44) 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?
45) Which two sfdx commands can be used to add testing data to a Developer sandbox?
Choose 2 answers
A. force:data:tree:import ✅
B. force:data:object:create
C. force:data:bulk:upsert ✅
D. force:data:async:upsert
46) A developer is creating a Lightning web component to show a list of sales records.
The Sales Representative user should be able to see the commission field on each record. The Sales
Assistant 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?
B. Use WITH SECURITY ENFORCED in the SOQL that fetches the data for the component.
D Use Lightning Locker Service to enforce sharing rules and field-level security.
Choose 3 answers
What should a developer use to create a Visualforce section on the Account page layout that displays all
of the Plan_c records related to the Account and all of the Plan_Item_c records related to those Plan_c
records.
49) 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?
Choose 2 answers
B. Use the @ReadOnly annotation to bypass the number of rows returned by a SOQL
D. Use the System.Limit class to monitor the current CPU governor limit consumption. ✅
50) What are two best practices when it comes to Lightning Web Component events?
Choose 2 answers
A. Use event.target to communicate data to elements that aren't in the same shadow tree. ✅
B. Use events configured with bubbles: false and composed: false.
B. Salesforce integrations
52) The Account object in an organization has a master detail relationship to a child object called Branch.
The following automations exist:
• Duplicate rules
What two things should the developer consider while testing the trigger code?
Choose 2 answers
A. Rollup summary fields can cause the parent record to go through Save. ✅
C. Duplicate rules are executed once all DML operations commit to the database.
53) 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. Triggers
B. Flows
C. Relationships ✅
E. Roll-up summaries ✅
if (ta.Active_c) (
a.Name INACTIVE:
update aList:
What should a developer do to correct the code so that there is no chance of hitting a governor limit?
55) How can a developer check the test coverage of autolaunched Flows before deploying them in a
change set?
What is the optimal 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" to True.
Set4_78
B. Importing data using the Data Loader and the Bulk API ✅
Choose 3 answers
A. Apex Class✅
B. Flow
C. Visualforce
D. Apex Trigger✅
E. User✅
4) 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.
5) 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?
Choose 2 answers
A Flow Builder ✅
B. Batch Jobs
C Remote Actions
D. Validation Rules ✅
Boolean is0R;
integer x:
x = 1;
x = 31
1 else (
x = 47
A. 4✅
B. 2
C. 3
D. 1
7) A developer created these three Rollup Summary fields in the custom object, Project_c
Total 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.
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. ✅
Which tag should a developer use to display the flow in the component?
A. lightning-flow
B. aura:flow
C. lightning: flow ✅
D. aura-flow
9) Which process automation should be used to post a message to Chatter without using Apex code?
A. Outbound Message
B. Entitlement Process
C. Strategy Builder
D. Flow Builder ✅
10) 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
void sort();
void draw():
12) 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?
Choose 2 answers
14) What are two benefits of using declarative customizations over code?
Choose 2 answers
15) 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?
insert acct;
C. 1 Account is inserted.
17) A developer needs to create a custom button for the Account object that, when clicked, will perform
a series of calculations and redirect the user to a custom Visualforce page. The developer wants to
ensure the Visualforce page matches the Lightning Experience user Interface
What attribute needs to be defined within the capex: page> tag to meet the requirement?
A. applyHtmlTag="true"
B. wizard="true"
C. setup="true"
D. lightningstylesheets="true" ✅
18) A developer is debugging the following code to determine why Accounts are not being created.
At one of the steps in the flow, the agents should be presented with a list of order numbers and dates
that are retrieved from an external order management system in real time and displayed on the screen.
B. An outbound message
C. An Apex controller.
D. An Invocable method
20) A Salesforce Administrator is creating a record-triggered flow. When certain criteria are met, the
flow must call an Apex method to execute a complex validation involving several types of objects.
When creating the Apex method, which annotation should a developer use to ensure the method can be
used within the flow?
A. @future
B. @AuraEnabled
C. @InvocableMethod ✅
D. @RemoteAction
21) Which three resources in an Aura Component can contain JavaScript functions?
Choose 3 answers
A. Style
B. Design
C. Controller ✅
D. Renderer✅
E. Helper ✅
22) 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?
A. Lookup field
B. External ID field✅
C. Formula field
D. External Object
23) 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?
C. Create a test class to execute the business logic and run the test in the Developer Console.
24) 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.
Choose 2 answers
A. The parent component can use the Apex controller class to send data to the child component.
C. The parent component can use a public property to pass the data to the child component. ✅
D. The parent component can use a custom event to pass the data to the child component. ✅
25) A developer is tasked with performing a complex validation using Apex as part of advanced business
logic. When certain criteria are met for a Purchase Order, the developer must throw a custom exception.
What is the correct way for the developer to declare a class that can be used as an exception?
26) Which two are phases in the Aura application event propagation framework?
Choose 2 answers
A. Default ✅
B. Emit
C. Control
D. Bubble✅
27) The following Apex method is part of the ContactService class that is called from a trigger: public
static void setBusinessUnitToEMEA(Contact thisContact){ thisContact.Business_Unit__c = "EMEA" ;
update thisContact; } How should the developer modify the code to ensure best practice are met?
contacts[0].Business_Unit__c = 'EMEA' ;
update contacts[0];
contacts.add(thisContact.Business_Unit__c = 'EMEA');
update contacts; ✅
thisContact.Business_Unit__c = 'EMEA' ;
update contacts[0];
thisContact.Business_Unit__c = 'EMEA' ;
update contacts;
29) A developer must provide custom user interfaces when users edit a Contact in either Salesforce
Classic or Lightning Experience
What should the developer use to override the Contact's Edit button and provide this functionality?
A. A Visualforce page in Salesforce Classic and a Lightning page in Lightning Experience
30) An org tracks customer orders on an Order object and the line items of an Order on the Line Item
object. The Line Item object has a master detail relationship to the Order object.
A developer has a requirement to calculate the order amount on an Order and the line amount on each
Line Item based on quantity and price.
A. Implement the line amount as a currency field and the order amount as a SUM formula field. ✅
B. Write a single before trigger on the Line Item that calculates the item amount and updates the order
amount on the Order.
C. 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.
D. Implement the line amount as a numeric formula field and the order amount as a roll-up summary
field.
31) Which three steps allow a custom Scalable Vector Graphic (SVG) to be included in a Lightning web
component?
Choose 3 answers
D. Import the static resource and provide a JavaScript property for it. ✅
Management wants to send a follow-up email reminder 6 hours after the stage_c field is set to "Waiting
on Customer". The Salesforce Administrator wants to ensure the solution used is bulk safe.
Which automation tool should a developer recommend to meet these business requirements?
A. Record-Triggered Flow
B. Entitlement Process
C. Scheduled Flow ✅
return results
Given the multi-tenant architecture of the Salesforce platform, what is a best practice a developer
should implement and ensure successful execution of the method?
35) A developer needs to implement a custom SOAP Web Service 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?
36) 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?
37) 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?
A. Query the Profile where the ID equals userInfo.getProfileID) and then use the
profile.Opportunity.getDefaultRecerdrype() method.
38) On a brand new developer org, a developer writes a single trigger named Account Trigger on the
Account object to perform complex validations on the after insert and after update DML events. A
Salesforce administrator creates a Process Builder to update a custom field within the same object every
time an Account is created or updated.
How many times will the Account Trigger fire if a new Account is inserted, assuming no other
automation logic is Implemented on the Account?
A. 1
B2✅
C. 6
D4
39) What are three considerations when using the @InvocableMethod annotation in Apex?
Choose 3 answers
A. A method using the @InvocableMethod annotation can have multiple input parameters.
E. Only one method using the @InvocableMethod annotation can be defined per Apex class. ✅
Why should the developer choose to use Data Loader instead of Data Import Wizard?
41) 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?
Choose 2 answers
A. String query='SELECT id FROM Account WHERE Name LIKE \''+ name.noquotes()+'\''s List Account>
results Database.query(query)
B. String query = 'SELECT Id FROM Account WHERE Name LIKE \'' + String.escapeSingleQuotes (name) +
'\'';
C. String query= 'SELECT Id FROM Account WHERE Name LIKE 4+name+ $\S
42) A developer must implement a checkPayment Processor class that provides check processing
payment capabilities that adhere to what is
A. public class CheckPayment Processor implements Payment Processor ( public void pay (Decimal
amount) (
B. public class CheckPayment Processor implements Payment Processor I public void pay (Decimal
amount!/
C. public class CheckPayment Processor extends Payment Processor 1 public void pay (Decimal amount);
43) 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 new Order
record?
44) A developer completed modifications to a customized feature that is comprised of two elements:
• Apex trigger
What are two factors that the developer must take into account to properly deploy the modification to
the production environment?
Choose 2 answers
C. At least one line of code must be executed for the Apex trigger
lastName+'*')7
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.
C. Use variable binding and replace the dynamic query with a static SOQL. ✅
D. Use the escapesinglegustes method to sanitize the parameter before its use. ✅
46) 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?
A. Kapex:message for="info"/>
47) 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?
48) 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
A. The Apex governor limits cannot be exceeded due to the asynchronous nature of the transaction.
B. The Apex governor limits are omitted while calling the constructor of the Apex class.
C. The Apex governor limits might be higher due to the asynchronous nature of the transaction. ✅
D. The Apex governor limits are reset for each iteration of the execute( method.✅
A. Changing a user's default division when the transfer division option is checked
50) Which two events need to happen when deploying to a production org?
Choose 2 answers