100% found this document useful (1 vote)
25 views69 pages

PD1 SP22

Download as pdf or txt
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 69

SP22 PD1 SET 2

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.

What should a developer implement to support these requirements?

A. Lookup field from Engineering Support to Opportunity

B. Master-detail field from Engineering Support to Opportunity✅

C. Lookup field from Opportunity to Engineering Support_o

D. Master-detail field from Opportunity to Engineering Support_

3)What is a benefit of developing applications in a multi-tenant environment?

A. Default out-of-the-box configuration ✅

B. Enforced best practices for development

C. Access to predefined computing resources

D. Unlimited processing power and memory


4)A developer has an Apex controller for a Visualforce page that takes an ID as a URL parameter.

How should the developer prevent a cross site scripting vulnerability?

A. ApexPages.currentPage ().getParameters ().get('url_param')

B. String.Valueof (ApexPages.currentPage().getParameters ().get('url_param'))

C. String, escapeSingleQuotes (ApexPages.current Page ().getParameters ().get('url_param*)

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?

A. Public abstract class ShippingCalculator

public void calculate() implementation/

B. public abatract class ShippingCalculator

public abstract calculate () { /*implementation*/ }

C. public abstract class ShippingCalculator ✅

public virtual void calculate) implementation/)

D. public abstract class ShippingCalculator

public override calculate() implementation/

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.

Which automation tool should be used to fulfill the business need?

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.

Which Visualforce feature supports this requirement?

A. controller extension

B. recordSecVar page attribute ✅

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?

A. @InvocableMethod (label-'Additional Info)

public static Contactinfo getInfo(Id contactid)

{ /*implementation" }

B. @InvocableMethod (label='Additional Info"

public static List ContactInfo> getInfo(ListId) contactIds)

[/implementation"] ✅

C. @ InvocableMethod(label-Additional Incot)

public List<Contactinfo> getInfo Listed contactIda)

1/implementation/1

D. @InvocableMethod (label-'Additional Info')

public Contactinto perinte (Id contactia) [/implementation"


9)A developer wants to get access to the standard price book in the org while writing a test class that
covers an OpportunityLineltem trigger.

Which method allows access to the price book?

A.Use IsTest (SecAllDato-true and delete the existing standard pricebook.

B. Use #TestVisible to allow the test method to see the standard price book.

c. Use Test.gejStandardfricebookid() to get the standard price book ID. ✅

D. Use Teat.IoadData() and a static resource to load a 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

B. Ant Migration Tool✅

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. Templates to create custom components

B. Prebuillt components that can be reused ✅

C. Support for Classic and Lightning UIs

D. Extended governor limits for applications

14)Which annotation exposes an Apex class as a RESTful web service?

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 ✅

B. A list of newly created sObjects without IDs

C. An empty list of sObjects

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/ }

Which is the correct implementation?

A. public class CreditCardFayment implements Payment (

public override void make Payment (Decimal amount) /"implementation"

B. public class Credit CardFayment extends Payment (

public virtual void makePayment (Decimal amount) (/implementation / 1

C. public class Credit CardPayment extends payment (

public override void make Payment (Decimal amount) (implementation") ✅

D. public class Credit CardFayment implemente Payment (

public virtual void makePayment (Decimal amount) (implementationt/)

Imp 2) Where are two locations a developer can look to find information about the status of batch or
future methods?

Choose 2 answers

A. Paused Flow Interviews component

B. Developer Console

C. Apex Flex Queue ✅

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.

Which statement is true regarding the outcome of the transaction?

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. Specify lightningCommunity_Fage as a target in the XML file.

B. Ensure isExposed is set to true on the XML file. ✅

C. Specify lightning_RecordPage as a target in the XML file. ✅

D. Specify lightningCommunity_Page Layout as a target in the XML file.

5) Which exception type cannot be caught?

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)" />

B. <apex:outputText escape-"false" value="||#CurrentPage.parameters.userInput)" /> ✅

C. <apex:outputField escape-"false" value="[ictri.userinput)" />

D. <apex:outputText value-"14CurrentPage.peraneters.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

A. Rich component ecosystem ✅

B. Self-contained and reusable units of an application ✅

C. Built-in standard and custom set controllers

D. Log capturing via the Debug Logs Setup page

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.

What is a possible reason that this change was not permitted?

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.

D. The organization wide default for the Vendor_ubject is Public Read/Write.


9)A developer needs to prevent the creation of Request__c records when certain conditions exist in the
system. A RequestLogic class exists that checks the conditions.

What is the correct implementation?

A. trigger RequestTrigger on Request (after brezt)

if (RequestLogic.isVelid (Request__c)

Request.addError ("Your request cannot be created at this time.");

B. trigger RequestTrigger on Request_c (after insert)

RequestLogic.validateRecords trigger.newl:

C. Trigger RequestTrigger on Request_c before insert)

if (RequestLogic.isValid(Request_c

Request.addError("Your request cannot be created at this time.");

D. trigger RequestTrigger on Request_c before insert) (

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.

What is the optimal way to implement this feature?

A. Build a flow with Flow Builder. ✅

B. Create a formula field.

C. Create an account approval process.

D. Build an account assignment rule.

11) What is an example of a polymorphic lookup field in Salesforce?


A. A custom field, Unk_c, on the standard Contact object that looks up to an Account or a Campaign

B. The LeadId and ContactId fields on the standard Campaign Member object

C. The WhatId field on the standard Event object ✅

D. The ParentId field on the standard Account 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.

B. A corresponding setter method is required for each getter method. ✅

C. Setter methods always have to be declared global.

D. Getter methods pass values from a controller to a page.✅

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.

How can this be achieved?

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.

B. Use the Metadata API to create real-time roll-up summaries.

C. Use the Streaming API to create real-time roll-up summaries.

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:

public class SilverLaptop!


//code implementation

How can a developer use the Laptop interface within the SilverLaptop class?

A. (Extende (class="Laptop"}

public class Silverlaptop

B. Interface (class="Laptop")

public class BilverLaptop

C. public class SilverLaptop implements Laptop ✅

D. public class SilverLaptop extends Laptop

18)How many Accounts will be inserted by the following block of code?

for (Integer i = 0; 5 < 500; ++) ["

Account a = new Account (Nanew'New Account + 1);

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?

A. Update the PrimaryId_c field definition to mark it as an External Id. ✅

B. Upload the CSV into a custom object related to Candidate_ c.

C Create a before insert trigger to correctly map the records.

D. Create a before save flow to correctly map the records.

21) What is a benefit of developing applications in a multi-tenant environment?

A. Default out-of-the-box configuration ✅

B. Unlimited processing power and memory

C. Enforced best practices for development

D. Access to predefined computing resources

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

B Loading externally hosted scripts

C. Specifying loading order ✅

D. One-time loading for duplicate scripts ✅

E. Loading scripts in parallel ✅

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?

A. Use the Database method with allorNone set to false. ✅

B. Remove the Apex class from the integration user's profile.

C. Use a try-catch block after the insert statement.

D. Deactivate the trigger before the integration runs.

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

A. Use the email on the contact record as an external ID.

B. Write a before trigger on the order object to delete any duplicates.

C. Ensure that the order number in the OMS is unique. ✅


D. Use the order number from the OMS as an external ID. ✅

25) How should a developer write unit tests for a private method in an Apex class?

A. Use the TestVisible annotation. ✅

B. Add a test method in the Apex class.

C. Use the SeeAllData annotation.

D. Mark the Apex class as global.

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.

What should a developer implement to support these requirements?

A. Lookup field from Engineering Support_e to Opportunity

B. Master-detail field from Engineering Support_c to Opportunity. ✅

C. Lookup field from Opportunity to Engineering Support_c

D. Master-detail field from Opportunity to Engineering Support_c

27) Given the following Anonymous block:

List<Case> casesToUpdate = new List<Case>();

for (Case thisCase: SELECT id, Status FROM Case LIKIT 500003 thisCase.Status Working":
casesToUpdate.add(thisCase):

tryl

Databaze.update (casesToUpdate,false); catch(Exception ell

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.

B. The transaction will fail due to exceeding the governor limit. ✅

C. The try-catch block will handle any DML exceptions thrown.

D. The transaction will succeed and changes will be committed.

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.

How should this be accomplished?

A. Create a custom event. ✅

B. Call a method in the Apex controller.

C. Update a property on the parent.

D. Fire a notification.

29) What are two characteristics related to formulas?

Choose 2 answers

A. Formulas can reference themselves.

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.

D. Formulas can reference values in related objects. ✅

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.

Which Apex technique should the developer use?

A. A for loop, with a avitch statement inside

B. An if-else statement, with a roz loop inside


C. A switch statement, with a for loop inside

D. A for loop, with an if-else statement inside ✅

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.

Which modification to the method is necessary?

A. The method must be decorated with (cacheable-crue).

B. The method must return a String of a serialized JSON Array.

C. The method must return a JSON Object.

D. The method must be decorated with @AuraEnabled. ✅

33) Considering the following code snippet:

public static void insertAccounts (List Account> theseAccounts) {


for (Account thisAccount : theseAccounts) [

if(thisAccount.website -- null)

thisAccount.webaice - "https://www.demo.com:

update theseAccounts:

When the code executes, a DML exception is thrown.

How should the developer modify the code to ensure exceptions are handled gracefully? -

A. Implement a try/catch block for the DML. ✅

B. Implement the upset DML statement.

C. Remove null items from the list of Accounts.

D. Implement Change Data Capture.

34) What is the result of the following code?

Account & = new Account ();

Database.insert (a, false);

A. The record will not be created and no error will be reported. ✅

B. The record will not be created and an exception will be thrown.

C. The record will be created and a message will be in the debug log.

D. The record will be created and no error will be reported.

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.

Which statement is true regarding this automation request?

A. This can only be automated with Apex code. ✅

B. The developer can use a record triggered flow with Actions.

C. This approval step cannot be automated and must be done manually.


D. The developer can use Einstein Next Best Actions..

36) The OrderHelper class is a utility class that contains business logic for processing orders. Consider
the following code snippet:

public class without sharing OrderHelpert

//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?

A. static decimal DELIVERY_MULTIPLIER = 4.15;

B. decimal DELIVERY_MULTIPLIER= 4.15;

C. static final decimal DELIVERY_MULTIPLIER = 4.15; ✅

D. constant decimal DELIVERY MULTIPLIER = 4.15;

37) Which code displays the contents of a Visualforce page as a PDF?

A. <apex: page contentType="pdf">

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.

Which update must the developer make in the flow?

A. Add a new Update Records element.

B. Add a new Get Records element.

C. Add a new Create Records element. ✅


D. Add a new Roll Back Records element,

39) Which three data types can a SOQL query return?

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?

A. Triggers are executed alphabetically by trigger name.

B. Trigger execution order cannot be guaranteed. ✅

C. Triggers are executed in the order they are created..

D. Triggers are executed in the order they are modified.

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

B. After record-triggered flow

C. Validation rule ✅

D. Before record-triggered flow


42) Universal Containers has created a unique process for tracking container repairs. A custom field,
Status_c, has been created within the Container_c custom object. A developer is tasked with sending
notifications to multiple external systems every time the value of the Status_c picklist changes.

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.

Which Visualforce feature supports this requirement?

A. controller extension

B. recordSecVar page attribute ✅

C. <apex:listButton> tag

D. custom controller
45) A developer creates a custom exception as shown below:

public class ParityException extends Expeption ()

What are two ways the developer can fire the exception in Apex?

Choose 2 answers

A. new ParityException('parity does not match'};

B. throw new ParityException(); ✅

C. throw new ParityException ('parity does not match'); ✅

D. new ParityException ():

46) When importing and exporting data into Salesforce, which two statements are true?

Choose 2 answers

A. Data import wizard is an application that is installed on your computer.

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.

D. Developer and Developer Pro sandboxes have different storage limits.✅

47) A developer wrote the following two classes:

public with sharing class StatusFetcher ( private Boolean active = true;

private Boolean isActive()

return active:

public with sharing other jou k Skater &

public void decepetangama

StatusFetcher Free - Intotuspeaches); public with sharing class Calculator (


public void doCalculations () [

Status Fetcher afetcher = new StatusFetcher();

if (sfetcher.isActive())

//do calculations here

The StatusFetcher class successfully compiled and saved. However, the Calculator class has a compile
time

error.

How should the developer fix this code?

A. Change the class declaration for the Calculator dass to public with inherited sharing.

B. Make the isActive method in the StatusFetcher class public. ✅

C. Make the doCalculations method in the Calculator class private.

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

A. String nextPage = controller.save().getUrl(): ✅

B. ApexPages.currentPage().getParameters().put('input, TestValue'); ✅

C. insert pageRef;

D. Test.setCurrentPage(pageRef); ✅

E. public ExtendedController(ApexPages.Standard Controller cntri) ()


49) 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 has a syntax error in the code.

B. The test method does not use System.runks to execute as a specific user.

C. The test method relies on existing data in the sandbox. ✅

D. The test method is calling an cucure method.

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.

Which type of org is best suited for this scenario?

A. Developer Edition

B. Full Sandbox

C. Partner Developer Edition

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.

What is the recommended way to accomplish this?

A. Create a custom event to handle the communication between components. ✅

B. Use an application event to communicate between the components.

C. The Toggle component should call a method in the Temperature component.

D . Use Lightning Message Service to communicate between the components.

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.

Which method allows access to the price book?

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.

C. Use Test.getStandard Pricebookid) to get the standard price book ID. ✅

D. Use Test.loadData() and a static resource to load a 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?

publio Class myclass (

public void myMethod() implementation / 1

A. Sharing rules will be inherited from the calling context. ✅

B. Sharing rules will be enforced by the instantiating class.

C. Sharing rules will not be enforced for the running user.

D. Sharing rules will be enforced for the running user.

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?

A. Use the with sharing keyword on the class declaration. ✅

B. Use the without sharing keyword on the class declaration.

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.

Consider the following code snippet:

@AuraEnabled

public static Listclastsbject>> searchTera (List<String> temlist) ( List<List<scbject>> result new


list<List<object>>();

for (String term: tertist) ( result.addA11([FIND :tern IN ALL FIELDS BETURNING Account (Name),

Contact (Firstlane, Lastliane)]);

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'

B. SELECT ID FROM Trainer_c WHERE Gym_r.Name = 'Viridian City Gym'


C. SELECT Id, (SELECT Id FROM Trainers__C) FROM Gym_c WHERE Name = 'Vizidian 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

A. Criteria-based Sharing calculations

B. Email messages

C. Lightning Flows✅

D. Workflow Rules ✅

E. Roll-Up Summary fields✅

4)A developer has the following requirements:

• Calculate the total amount on an Order.

• Calculate the line amount for each Line Item based on quantity selected and price.

. Move Line Items to a different Order if a Line Item is not in stock.

Which relationship implementation supports these requirements on its own?

A. Line Item has a re-parentable master-detail field to Order. ✅

B. Order has a re-parentable master-detail field to Line Item.

C. Line Item has a re-parentable lookup field to Order.

D. Order has a re-parentable lookup field to Line Item.

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)

public static List<Opportunity> search (String term) { /*implementation*/ }


B. @AuraEnabled (cacheable=false)

public List<Opportunity> search (String term) { /*implementations/

C. @AuraEnabled(cacheable=true)

public static List<Opportunity> search (String term) { /*implementation*/ } =

D. @AuraEnabled (cacheable=true) ✅

public List<Opportunity> search (String term) { /*implementation*/ }

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?

A. A record trigger flow on the Opportunity object

B. An Apex trigger on the Opportunity object

C. An approval process on the Opportunity object ✅

D. An error condition formula on a validation rule on Opportunity

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.

B. Use a LATEST formula on each of the latest availability date fields.

C. Use a MAX Roll-Up Summary field on the latest availability date fields. ✅

D. Use a CEILING formula on each of 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?

A. <lightning-input-field field-name="Salary_c"> </lightning-input-field>

B. <lightning-formatted-number value="Salary_c" format-style "currency </lightning-formatted-


number>

C. <lightning-input type="number" value="Salary_c" formatter="currency"> </lightning-input> ✅

D. <lightning-input-currency value="Selary_c"> </lightning-input-currency>

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?

A. Create a custom field on the child object of type Lookup. ✅


B. Create and populate a custom field on the parent object marked as an External ID.

C. Create and populate a custom field on the parent object marked as Unique.

D. Create a custom field on the child object of type External Relationship.

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 ✅

C. Full Copy sandboxes

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.

public without sharing class OpportunityService!

public static ListcopportunityLineItem> getOpportunityProducts (Set<Id> opportunityIds)


{ List<OpportunityLineItem> oppLineItems = new List<OpportunityLineItem> (); for (Id thisOppId:
opportunityIde) (

oppLineItens.addAll([Select Id FROM OpportunitylineItem WHERE OpportunityId=

:thisOppid]):

return oppLineItems:

The above method might be called during a trigger execution via a Lightning component.

Which technique should be implemented to avoid reaching the governor limit?


A. Refactor the code above to perform only one SOQL query, filtering by the set of opportunityIds. ✅

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

A. Read/Write access on the primary relationship ✅

B. Read/Write access on the junction object

C. Read/Write access on the secondary relationship ✅

D. Read access on the primary relationship

15) Given the following code snippet, that is part of a custom controller for a Visualforce page:

public void updateContact (Contact this Contact) [

thisContact.Is Active c = false;

tryl

update thisContact;

catch (Exception e) {

String errorMessage = 'An error occurred while updating the Contact. ee.getMessage());

ApexPages.addmessage (new ApexPages.message (ApexPages.severity.FATAL, errorMessage)):

In which two ways can the try/catch be enclosed to enforce object and field-level permissions and
prevent the DML statement from being executed if the current logged-in user does not have the
appropriate level of access?

Choose 2 answers

A Use 11 (Schema.s0bjectType.Contact.isaccessible())
B. Use if(thisContact.OwnerIdUserInfo.gett

C. Use if (Schens.sobjectType.Contact.fields. Is Active_c.isUpdateable()) ✅

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✅

17)Refer to the following Apex code:

Integer x = 0;

do t

x = 1;

} while (x1);

System.debug (x);

What is the value of x when it is written to the debug log?

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?

A. Roll-up summary field ✅

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/> ✅

D. <apex:stylesheet value="[1&URLFOR (@Resource.sida, 'assets/sids.css'))">

20) What are two use cases for executing Anonymous Apex code?

Choose 2 answers

A. To add unit test code coverage to an org

B. To run a batch Apex class to update all Contacts ✅

C. To delete 15,000 inactive Accounts in a single transaction after a deployment

D. To schedule an Apex class to run periodically ✅

21) A developer wants to invoke an outbound message when a record meets a specific criteria.

Which two features satisfy this use case?


Choose 2 answers

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

public void static updateLeads() {

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?

A. Total number of SOQL queries issued

B. Total number of records processed as a result of DML statements

C. Total number of records retrieved by SOQL queries ✅

D. Total number of DML statements issued

23) A developer receives an error when trying to call a global server-side method using the
@remateAction decorator.

How can the developer resolve the error?

A. Add static to the server-side method signature.✅

B. Decorate the server-side method with (static-false).

C. Decorate the server-side method with (static-true).

D. Change the function signature to be private static.


24) 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 Postal CodeToTimezone_c custom object.

Which two automation tools can be used to implement this feature?

Choose 2 answers

A. Before-save flow ✅

B. Approval process

C. Quick actions

D. Account trigger ✅

25) A software company uses the following objects and relationships:

. Case: to handle customer support issues

• 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

Case and Defect_c have Private organization-wide defaults.

What should be done to share a specific Case_Defect_c record with a user?

A. Share the parent Case and Defecte records. ✅

B. Share the parent Case record.

C. Share the Case_Defecte record.

D. Share the parent Defecte record.

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.

What should the developer do to fix this error?

A. Move the callout to an asynchronous method with @future (callout-true) annotation. ✅

B. Replace the after update trigger with a before insert trigger.

C. Surround the external call with a try-catch block to handle the exception.

D. Write a REST service to integrate with the external web service.

28) A developer must troubleshoot to pinpoint the causes of performance issues when a custom page
loads in their org..

Which tool should the developer use to troubleshoot?

A. Visual Studio Code IDE

B. Developer Console ✅

C. AppExchange

D. Setup Menu
29) Given the following Apex statement:

Account myAccount = [SELECT Id, Name FROM Account]:

What occurs when more than one Account is returned by the SOQL query?

A. An unhandled exception is thrown and the code terminates. ✅

B. The query fails and an error is written to the debug log.

C. The variable, myAccount, is automatically cast to the List data type.

D. The first Account returned is assigned to myAccount.

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.

for (Account a: Trigger.new) {

if(a.Annual Revenue> 1000000) (

List<Opportunity> opplist [SELECT Id FROM Opportunity WHERE accountId = a.Id];

if (opplist.size() == 0) {

Opportunity oppty new Opportunity (Name = a.name, StageName Prospecting', CloseDate system.
today().addDays (30));

insert oppty:

Users are able to update the account records via the UI and can see an opportunity created for high
annual revenue accounts. However, when the administrator tries to upload a list of 179 accounts using
Data Loader, it fails with System. Exception errors.

Which two actions should the developer take to fix the code segment shown above?

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.

D. Query for existing opportunities outside the for loop.✅

31)A developer identifies the following triggers on the Expense_c object:

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'){

thisAccount.Is Tech_ c = true;

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.

Which three things should the developer do to satisfy these requirements?

Choose 3 answers

A. Add a dynamic action to the Account record page. ✅

B. Create a custom permission for the users. ✅

C. Create a Lightning web component.

D. Add a dynamic action to the user's assigned page layouts.

E. Create a dynamic form. ✅

36) Which three statements are true regarding custom exceptions in Apex?

Choose 3 answers

A. A custom exception class must extend the system Exception class. ✅

B. A custom exception class can implement one or many interfaces. ✅

C. A custom exception class name must end with "Exception". ✅

D. A custom exception class can extend other classes besides the Exception class.

E. A custom exception class cannot contain member variables or methods.

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.

B. Rewrite all Visualforce pages as Lightning components.

C. Set the attribute enableLightning to true in the definition.

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.

Which two statements are valid considerations when using merge?

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. ✅

C. External ID fields can be used with the merge method. ✅

D. Merge is supported with accounts, contacts, cases, and leads.


40) A Next Best Action strategy uses an Enhance Element that invokes an Apex method to determine a
discount level for a Contact, based on a number of factors.

What is the correct definition of the Apex method?

A. @InvocableMethod

global Recommendation getLevel (ContactWrapper input)

{/implementation*/ }

B. @InvocableMethod

global static ListRecommendation getlevel (List<ContactWrapper> input)

implementation /

C. @InvocableMethod

global List<List<Recommendation>> getLevel (List<ContactWrapper> input)

[/implementation*/ }

D. @InvocableMethod

global static List<List<Recommendation>> getLevel (List<ContactWrapper> input)

{ /*implementation/]. ✅

41) Which three Salesforce resources can be accessed from a Lightning web component?

Choose 3 answers

A. Content asset files ✅

B. All external libraries

C. SVG resources ✅

D. Third-party web components

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?

A. Use @TestSetup with a void method. ✅

B. Create a mock using the Stub API.

C. Create test data before Teat.startTest() in the unit test.


D. Add @IsTest (seeAllDats-true) at the start of the unit test class.

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?

A. Use Lightning Data Service to get the collection of sales records.

B. Use WITH SECURITY ENFORCED in the SOQL that fetches the data for the component.

C. Use Security.stripInaccessible to remove fields inaccessible to the current user. ✅

D Use Lightning Locker Service to enforce sharing rules and field-level security.

47) What are three characteristics of change set deployments?

Choose 3 answers

A. Sending a change set between two orgs requires a deployment connection. ✅

B. Change sets can only be used between related organizations. ✅

C. Change sets can be used to transfer records.

D. Change sets can deploy custom settings data.

E. Deployment is done in a one-way, single transaction. ✅


48) An org has two custom objects:

• Plan_c, that has a master-detail relationship to the Account object

• Plan Item c, that has a master-detail relationship to the Flan_c object

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.

A. A standard controller with a controller extension ✅

B. A standard controller with a custom controller

C. A custom controller by itself

D. A controller extension with a custom controller

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

A. Use partial DML statements to ensure only valid data is committed.

B. Use the @ReadOnly annotation to bypass the number of rows returned by a SOQL

C. Use the Database.Savepoint method to enforce database integrity. ✅

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.

C. Use CustomEvent to pass data from a child to a parent component. ✅

D. Use event.detail to communicate data to elements in the same shadow tree.

51) What can be developed using the Lightning Component framework?

A. Dynamic web sites

B. Salesforce integrations

C. Single-page web apps ✅

D. Hosted web applications

52) The Account object in an organization has a master detail relationship to a child object called Branch.
The following automations exist:

• Rollup summary fields

Custom validation rules

• Duplicate rules

A developer created a trigger on the Account object.

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. ✅

B. The trigger may fire multiple times during a transaction. ✅

C. Duplicate rules are executed once all DML operations commit to the database.

D. The validation rules will cause the trigger to fire again.

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 ✅

D. Custom objects and fields✅

E. Roll-up summaries ✅

54) Given the code below in an Apex class:

List<Account> 8List (SELECT Id, Active_c FROM Account];

for (Account a: alist) !

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?

A. Change the DML to use Database.update (aList, true);

B. Change the DML to use Database.update (slist, false);

C. Add a LIMIT clause to the SOQL statement.

D. Add a WHERE clause to the SOQL statement. ✅

55) How can a developer check the test coverage of autolaunched Flows before deploying them in a
change set?

A. Use the Flow Properties page.

B. Use SOQL and the Tooling API. ✅

C. Use the ApexTestResult class.

D. Use the Code Coverage Setup page.


56) A custom picklist field, Food Preference o, 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 optimal way to ensure a value is selected every time a record is saved?

A. Mark the field as Required on the object's page layout.

B. Write an Apex trigger to ensure a value is selected.

C. Mark the field as Required on the field definition. ✅

D. Set "Use the first value in the list as the default value" to True.
Set4_78

1) A developer wrote Apex code that calls out to an external system.

How should a developer write the test to provide test coverage?

A. Write a class that extends HTTPCalloutMock.

B. Write a class that implements WebServiceMocki

C. Write a class that implements HTTPCalloutMock. ✅

D. Write a class that extends WebserviceMock.

2) Which action causes a before trigger to fire by default for Accounts?

A. Converting Leads to Contacts

B. Importing data using the Data Loader and the Bulk API ✅

C. Updating addresses using the Mass Address update tool

D. Renaming or replacing picklists

3) For which three items can a trace flag be configured?

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.

Which security consideration should the developer be aware of?

A. Lightning Data Service handles sharing rules and field-level security.✅

B. Lightning Data Service Ignores field-level security.

C. The isAccessible () method must be used for field-level access checks.

D. The with sharing keyword must be used to enforce sharing rules.

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 ✅

6) A developer considers the following snippet of code:

Boolean is0R;

integer x:

String theString = 'Hello':

if (isok false te the string - Bello'

x = 1;

} else if (isok= true & the String = 'Hello' t


x = 2:

} else if (isok 1= null as the string 'Hello')

x = 31

1 else (

x = 47

Based on this code, what is the value of x?

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 Approved Timesheets_c

Total Rejected_Timesheet_c.

The developer is asked to create a new field that shows the ratio between rejected and approved
timesheets for a given project.

What are two benefits of choosing a formula field instead of an Apex trigger to fulfill the request?

Choose 2 answers

A. A formula field will trigger existing automation when deployed.

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. ✅

D. Using a formula field reduces maintenance overhead. ✅


8) A Salesforce Administrator used Flow Builder to create a flow named "accountOnboarding". The flow
must be used inside an Aura component.

Which tag should a developer use to display the flow in the component?

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

A. SOQL is faster for text searches.

B. SOSL is able to return more records.

C. SOQL is able to return more records. ✅

D. SOSL is faster for text searches. ✅


11) A developer must create a DrawList class that provides capabilities defined in the Sortable and
Drawable Interfaces.

public interface Sortable (

void sort();

public interface Dravable t

void draw():

Which is the correct implementation?

A. public class DrawList implements Sortable, Drawable ✅

public void sort() (implementation

public void draw() implementation/

B. public class Draulist extends Sortable, Drawable t

public void sort () implementation"

public void draw(implementation/

C. public class DrawList extends Sertable, extenda Prawable

public void sect() (/*implementation")

public void draw) implementation/

D. public class crawlist implements Sortable, implemente braushta

public void wort() (/implementation/y public void dravo implementation"

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?

A. Use Anonymous Apex to create the required data.

B. Use Test.loadData() and reference a CSV file in a static resource. ✅

C.Use SOQL to query the org for the required data.

D. Use Test.loadData() and reference a JSON file in Documents.


13) A developer must create an Apex class, ContactController, that a Lightning component can use to
search for Contact records. Users of the Lightning component should only be able to search for Contact
records to which they have access.

Which two will restrict the records correctly?

Choose 2 answers

A. public without sharing class ContactController

B. public class Contact Controller

C. public with sharing class ContactController ✅

D. public inherited sharing class contactcontroller ✅

14) What are two benefits of using declarative customizations over code?

Choose 2 answers

A. Declarative customizations cannot generate run time errors.

B. Declarative customizations automatically update with each Salesforce release. ✅

C. Declarative customizations generally require less maintenance. ✅

D. Declarative customizations automatically generate test classes.

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?

A. @AuraEnabled(getAccounts, 'SsearchTerm') accountList:

B. @wire (getAccounts, { searchTerm: 'SsearchTerm' }) accountList;✅

C. @wire (getAccounts, 'SsearchTerm") accountList/

D. @AuraEnabled(getAccounts, I searchTerm: 'SsearchTerm')) accountList/


16) What is the result of the following code snippet?

public void doWork (Account acct) [

for (Integer i = 0; i <= 200; i++){

insert acct;

A. 201 Accounts are inserted.

B. 0 Accounts are inserted. ✅

C. 1 Account is inserted.

D. 200 Accounts are 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.

List<Account> accts = getAccounts(); Database.insert (accts,' false); // getAccounts implemented


elsewhere

How should the code be altered to help debug the issue?

A. Set the second insert method parameter to true.

B. Add a try-catch around the insert method.

C. Collect the insert method return value in a SaveResult variable. ✅

D. Change the DML statement to insert accts.


19) Cloud Kicks has a multi-screen flow that its call center agents use when handling Inbound service
desk calls.

At one of the steps in the flow, the agents should be presented with a list of order numbers and dates
that are retrieved from an external order management system in real time and displayed on the screen.

What should a developer use to satisfy this requirement?

A. An Apex REST class ✅

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?

A. Include a try/catch block to the Apex class. ✅

B. Run the code in an Execute Anonymous block in the Developer Console.

C. Create a test class to execute the business logic and run the test in the Developer Console.

D. Include a savepoint and Database.rollback().

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.

In which two ways can this be accomplished?

Choose 2 answers

A. The parent component can use the Apex controller class to send data to the child component.

B. The parent component can invoke a method in 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?

A. public class Purchase orderException implements Exception()

B. public class Purchase order extends Exception()

C. public class Purchase orderException extends Exception() ✅

D. public class Purchase Order implements 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?

A. Public void setBusinessUnitToEMEA(List<Contact> contatcs){

contacts[0].Business_Unit__c = 'EMEA' ;

update contacts[0];

B. Public static void setBusinessUnitToEMEA(Contact thisContact){

List<Contact> contacts = new List<Contact>();

contacts.add(thisContact.Business_Unit__c = 'EMEA');
update contacts; ✅

C. Public static void setBusinessUnitToEMEA(List<Contact> contacts){

for(Contact thisContact : contacts){

thisContact.Business_Unit__c = 'EMEA' ;

update contacts[0];

D. Public static void setBusinessUnitToEMEA(List<Contact> contacts){

for(Contact thisContact : contacts) {

thisContact.Business_Unit__c = 'EMEA' ;

update contacts;

28) Which scenarlo is valid for execution by unit tests?

A. Set the created date of a record using a system method. ✅

B. Generate a Visualforce PDF with gezContentAsPDF ().

C. Load data from a remote site with a callout.

D Execute anonymous Apex as a different user.

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

B. A Lightning page in Salesforce Classic and a Visualforce page In Lightning Experience

C. A Visualforce page in Salesforce Classic and a Lightning component in Lightning Experience. ✅

D. A Lightning component in Salesforce Classic and a Lightning component 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.

What is the correct implementation?

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

A. Reference the import in the HTML template.

B. Import the SVG as a content asset file.

C. Reference the property in the HTML template. ✅

D. Import the static resource and provide a JavaScript property for it. ✅

E. Upload the SVG as a static resource. ✅


33) Universal Containers uses Service Cloud with a custom field, stage_c, on the Case object.

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 ✅

D. Einstein Next Best Action

34) Consider the following code snippet:

public static List<Lead> obtainAllFields (Set<Id> leadIds) {

List<Lead> result new List (Lead>();

For (Id leadId : leadIda) (

result.add([SELECT FIELDS (ALL) FROM Lead WHERE Id leadid] =

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?

A Avoid executing queries without a limit clause.

8. Avoid returning an empty List of records.

C. Avoid using variables as query filters.

D. Avoid performing queries inside for loops. ✅

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?

A. webservice class WebServiceClass [


private Boolean helperMethod() / implementation ... /1 webservice static String updateRecords () 7
implementation... /1

B. global class WebServiceClass (

private Boolean helpermethod () / implementation ... /1 global String updateRecords () /


implementation

C. global class WebServiceClass |

private Boolean helpermethod() (/* implementation)✅

webservice static String updateRecorde () / Implementation ... +/ )

D. webservice class WebserviceClass (

private Boolean helperMethod() / implementations d global static string updateRecords () /


implementation ... " )

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?

A. Add custom controller attributes to display the message.

B Perform the DML using the Database.upsert () method.

C. Include <apex messages on the Visualforce page. ✅

D. Use a try/catch with a custom exception class.

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.

B. Use Opportunity.SobjectType.getDescribe ().getRecordTypeInfos) to get a list of record types, and


iterate through them until isDefaultRecordTypeMapping() is true. ✅
C. Create the opportunity and check the opportunity.recordtype, which will have the record ID of the
current user's default record type, before inserting.

D. Use the schema.userInfo.opportunity.getDefaultRecordPyp () 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.

B. A method using the @InvocableMethod annotation can be declared as Public or Global. ✅

C. A method using the @InvocableMethod annotation must define a return value.

D. A method using the @InvocableMethod annotation must be declared as static. ✅

E. Only one method using the @InvocableMethod annotation can be defined per Apex class. ✅

40) A developer wants to import 500 Opportunity records into a sandbox.

Why should the developer choose to use Data Loader instead of Data Import Wizard?

A. Data Import Wizard can not import all 500 records.


B. Data Import Wizard does not support Opportunities. ✅

C. Data Loader automatically relates Opportunities to Accounts.

D. Data Loader runs from the developer's browser.

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) +
'\'';

List<Account> results Database.query(query); ✅

C. String query= 'SELECT Id FROM Account WHERE Name LIKE 4+name+ $\S

List<Account> results Database.query(query) z

D. String query= %'' + name + %';✅

List<Account> results= (SELECT Id FROM Account WHERE Name LIKE query]:

42) A developer must implement a checkPayment Processor class that provides check processing
payment capabilities that adhere to what is

defined for payments in the PaymentProcessor interface.

public interface Payment Processor (

Void pay (Decinal amount);

Which is the correct implementation to use the paymentprocessor interface class?

A. public class CheckPayment Processor implements Payment Processor ( public void pay (Decimal
amount) (

// functional code here ✅

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);

D. public class CheckPayment Processor extends Payment Processor (

public void pay Decimal amount) t

//functional code here

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?

A. Select the Allow reparenting option on the master-detail relationship.

B. Change the master-detail relationship to an external lookup relationship.

C. Add without sharing to the Apex class declaration.

D. Create a junction object between OrderItem and Order. ✅

44) A developer completed modifications to a customized feature that is comprised of two elements:

• Apex trigger

Trigger handler Apex class

What are two factors that the developer must take into account to properly deploy the modification to
the production environment?

Choose 2 answers

A. Apex classes must have at least 75% code coverage org-wide. ✅

B. Test methods must be declared with the centretned keyword

C. At least one line of code must be executed for the Apex trigger

D. All methods in the test classes must use gistest. ✅


45) A developer is tasked to perform a security review of the Contactsearch Apex class that exists in the
system. Within the class, the developer identifies the following method as a security threat:

List<Contact performsearch (string lastName) ( return Database.query('SELECT id, FirstName, LastName


FROM Contact WHERE LastName Like -

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.

B. Use a regular expression expression on the parameter to remove special characters.

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"/>

B. <apex: pageMessages /> ✅

C. <apex:facet name="messages" />

D. <apex: pageMessage severity="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?

A. Master-detail field from Applicant to Job ✅

B. Junction object between Applicant and Job


C. Lookup field from Applicant to Job

D Formula field on Applicant that references 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.✅

49) Which action may cause triggers to fire?

A. Changing a user's default division when the transfer division option is checked

B. Updates to Feed Items ✅

C. Cascading delete operations

D. Renaming or replacing a picklist entry

50) Which two events need to happen when deploying to a production org?

Choose 2 answers

A All Visual flows must have at least 19% test coverage.

B. All triggers must have some test coverage. ✅

C. All Apex code must have at least 75% test coverage. ✅

D. All Workflow rules must have at least 16 test coverage.

You might also like