0% found this document useful (0 votes)
688 views57 pages

Platform Developer Exam

The document provides a sample exam for the Salesforce Platform Developer I certification. It includes 14 multiple choice questions about concepts like data backups, Apex code, sharing rules, and change sets. For each question, there is an explanation of the correct answer. The exam covers a range of topics relevant to developing on the Salesforce platform.

Uploaded by

Shantelle Smith
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
688 views57 pages

Platform Developer Exam

The document provides a sample exam for the Salesforce Platform Developer I certification. It includes 14 multiple choice questions about concepts like data backups, Apex code, sharing rules, and change sets. For each question, there is an explanation of the correct answer. The exam covers a range of topics relevant to developing on the Salesforce platform.

Uploaded by

Shantelle Smith
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 57

Questions & Answers PDF Page 1

Salesforce
PDI Exam
Platform Developer I

https://www.certshero.com
Questions & Answers PDF Page 2

Product Questions: 149


Version: 27.0

Question: 1

Universal Containers wants to back up all of the data and attachments in its Salesforce org once
month. Which approach should a developer use to meet this requirement?

A. Use the Data Loader command line.


B. Create a Schedulable Apex class.
C. Schedule a report.
D. Define a Data Export scheduled job.

Answer: D
Explanation:

Scheduling a Data Export job is the best way to back up all the data and attachments in a Salesforce
org once a month. The Data Export job can be scheduled to run at a certain frequency so that the
data can be backed up on a regular basis. This makes it easy to restore the data in case of any
emergency.

Question: 2

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

Answer: B
Explanation:

A Lightning Component can be used to override the Account's standard Edit button for Lightning
Experience. This allows the developer to create a custom page with custom fields and custom
functionality that can be used instead of the standard Edit page. It also allows for the creation of
custom navigation and buttons to make the user experience more intuitive and efficient.
Reference: https://trailhead.salesforce.com/en/content/learn/projects/quick-start-lightning-
components

https://www.certshero.com
Questions & Answers PDF Page 3

Question: 3

When using SalesforceDX, what does a developer need to enable to create and manage scratch orgs?
A. Production
B. Dev Hub
C. Environment Hub
D. Sandbox
Answer: B
Explanation:
https://developer.salesforce.com/docs/atlas.en-
us.sfdx_dev.meta/sfdx_dev/sfdx_dev_scratch_orgs.htm

 When using SalesforceDX, a developer needs to enable Dev Hub in order to create and manage
scratch orgs. A Dev Hub is a special type of org used by developers to store source code and other
development-related artifacts. It is also used to create and manage scratch orgs, which are
temporary orgs used for development and testing.
Reference: https://developer.salesforce.com/docs/atlas.en-
us.sfdx_dev.meta/sfdx_dev/sfdx_dev_intro.htm

Question: 4

Refer to the following code snippet for an environment that has more than 200 Accounts belonging
to the Technology' industry:

which three statements are accurate about debug logs?


Choose 3 answers

A. Debug log levels are cumulative, where FINE log level includes all events logged at the DEBUG,
INFO, WARN, and ERROR levels.
B. The maximum size of a debug log is 5 MB.
C. Only the 20 most recent debug logs for a user are kept.
D. Debug logs can be set for specific users, classes, and triggers.
E. System debug logs are retained for 24 hours.

Answer: C, D, E
Explanation:

Question: 5

Universal Containers implemented a private sharing model for the Account object. A custom Account

https://www.certshero.com
Questions & Answers PDF Page 4

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 permission for the currently logged-in user
while using the custom search tool?

A. Use the schema describe calls to determine if the logged-in users has access to the Account
object.
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 with sharing keyword on the class declaration.

Answer: D
Explanation:

Use the with sharing keyword on the class declaration. The with sharing keyword ensures that the
Apex code respects the object-level, field-level, and record-level sharing settings for the user who is
running the Apex code. This means that the code will only return records that the user has access to,
according to their Sharing Settings. You can find more information about the with sharing keyword in
the official Salesforce documentation (https://developer.salesforce.com/docs/atlas.en-
us.apexcode.meta/apexcode/apex_classes_keywords_sharing.htm).

Question: 6

What are two use cases for executing Anonymous Apex code? Choose 2 answers

A. To delete 15,000 inactive Accounts In a single transaction after a deployment


B. To schedule an Apex class to run periodically
C. To run a batch Apex class to update all Contacts
D. To add unit test code coverage to an org

Answer: B, C
Explanation:

Question: 7

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. <apex: pageMessages />


B. <apex: pageMessage severity=”info’’/>
C. <Apex: facet name=’’ message’’/>
D. <Apex: message for=’’ info’’/>

Answer: B
Explanation:

https://www.certshero.com
Questions & Answers PDF Page 5

Question: 8

When importing and exporting data into Salesforce, which two statements are true?
Choose 2 answers

A. Bulk API can be used to import large data volumes in development environments without
bypassing the storage limits.
B. Bulk API can be used to bypass the storage limits when importing large data volumes in
development environments.
C. Developer and Developer Pro sandboxes have different storage limits.
D. Data import wizard is a client application provided by Salesforce.

Answer: C, D
Explanation:

Question: 9

Where are two locations a developer can look to find information about the status of asynchronous
or future methods? Choose 2 answers

A. Apex Flex Queue


B. Apex Jobs
C. Paused Flow Interviews component
D. Time-Based Workflow Monitor

Answer: A, B
Explanation:

Question: 10

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 and method using the public access modifier.
B. Declare the class as global and use the public access modifier on the method.
C. Declare the class as public and use the global access modifier on the method.
D. Declare the class and method using the global access modifier.

Answer: D
Explanation:

https://www.certshero.com
Questions & Answers PDF Page 6

Question: 11

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. 3
C. 4
D. 2

Answer: D
Explanation:

Question: 12

Since Aura application events follow the traditional publish-subscribe model, which method is used
to fire an event?

A. ernit()
B. fireEvent()
C. fire()
D. registerEvent()

Answer: C
Explanation:

Question: 13

A developer wants to mark each Account in a List<Account> as either or Inactive based on the
LastModified field value being more than 90 days.
Which Apex technique should the developer use?

A. A for loop, with a switch statement inside


B. A Switch statement, with a for loop inside
C. An If/else statement, with a for loop inside
D. A for loop, with an if/else statement inside

Answer: D
Explanation:

Question: 14

https://www.certshero.com
Questions & Answers PDF Page 7

What are three characteristics of change set deployments?


Choose 3 answers

A. Change sets can only be used between related organizations.


B. Change sets can be used to transfer records.
C. Sending a change set between two orgs requires a deployment connection.
D. Change sets can deploy custom settings data.
E. Deployment is done in a one-way, single transaction.

Answer: A, B, E
Explanation:

Question: 15

A developer must create a DrawList class that provides capabilities defined in the Sortable and
Drawable interfaces. public interface Sortable { void sort(); } public interface Drawable { void draw(); }
Which is the correct implementation?

A. Public class DrawList implements Sortable, Implements Drawable {

public void sort() { /*implementation*/}

public void draw() { /*implementation*/}

]
B. Public class DrawList extends Sortable, Drawable {

public void sort() { /*implementation*/}

public void draw() { /*implementation*/}

}
C. Public class DrawList implements Sortable, Drawable {

public void sort() { /*implementation*/}

public void draw() { /*implementation*/}

}
D. Public class DrawList extends Sortable, extends Sortable, extends Drawable {

public void sort() { /*implementation*/ }

public void draw() { /* implementation */}

Answer: C
Explanation:

https://www.certshero.com
Questions & Answers PDF Page 8

Question: 16

A developer wants to get access to the standard price book in the org while writing a test class that
covers an OpportunityLineItem trigger. Which method allows access to the price book?

A. Use Test.loadData ( )and a static resource to load a standard price book


B. Use @TestVisible to allow the test method to see the standard price book.
C. Use Test,getStandardPricebookid ( ) to get the standard price book ID.
D. Use @IsTest (SeeAllData=True) and delete the existing standard price book

Answer: C
Explanation:

Question: 17

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

Answer: B
Explanation:

Question: 18

A developer created a Lightning web component called statusComponent to be inserted into the
Account record page.
Which two things should the developer do to make the component available?

A. Add <isExposed> true</isExposed> to the statusComponent.js-meta ml file.


B. Add <target> lighting _RecordPage </target> to the statusComponent.js-meta ml file.
C. Add < masterLabel>Account</master Label> to the statusComponent.js-meta ml file.
D. Add<target> Lightning_RecordPage </target> to the statusComponent.js file.

Answer: A, B
Explanation:

Question: 19

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

https://www.certshero.com
Questions & Answers PDF Page 9

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 with sharing keyword must be used to enforce sharing rules.
D. The isAccessible ( ) method must be used for field-level access checks

Answer: A
Explanation:

Question: 20

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 own7

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.

Answer: A
Explanation:

Question: 21

A developer created a child Lightning web component nested inside a parent Lightning web
component, 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 a custom event to pass the data to the child component,
B. The parent component can use the Apex controller class to send data to the child component.
C. The parent component can invoke a method in the child component
D. The parent component can use a public property to pass the data to the child component.

Answer: A, D
Explanation:

Question: 22

What should a developer do to check the code coverage of a class after running all tests?

https://www.certshero.com
Questions & Answers PDF Page 10

A. View the Code Coverage column in the list view on the Apex Classes page.
B. View the Class Test Percentage tab on the Apex Class fist view m Salesforce Setup.
C. View Use cede coverage percentage for the class using the Overall Code Coverage panel in the
Developer Console Tests tab.
D. Select and run the class on the Apex Test Execution page in the Developer Console.

Answer: B
Explanation:

Question: 23

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

A. Use the SeeAllData annotation.


B. Add a test method in the Apex class.
C. Use the TestVisible annotation.
D. Mark the Apex class as global.

Answer: C
Explanation:

Question: 24

What are three capabilities of the <ltng : require> tag when loading JavaScript resources in Aura
components?
Choose 3 answers

A. Loading files from Documents


B. One-time loading for duplicate scripts
C. Specifying loading order
D. Loading scripts In parallel
E. Loading externally hosted scripts

Answer: B,C, D
Explanation:

Question: 25

An org has an existing Flow that creates an Opportunity with an Update Records element. A
developer update the Flow to also create a Contact and store the created Contact's ID on the
Opportunity.
Which update should the developer make in the Flow?

A. Add a new Get Records element.


B. Add a new Update Records element.

https://www.certshero.com
Questions & Answers PDF Page 11

C. Add a new Quick Action element(of type Create).


D. Add a new Create Records element.

Answer: D
Explanation:

Question: 26

Which three resources in an Azure Component can contain JavaScript functions?

A. Controllers
B. helper
C. Design
D. Style
E. Renderer

Answer: A, B, E
Explanation:

Question: 27

A custom picklist field, Food_Preference__c, exist on a custom object. The picklist contains the
following options: 'Vegan','Kosher','No Preference'. The developer must ensure a value is populated
every time a record is created or updated. What is the most efficient way to ensure a value is
selected every time a record is saved?

A. Set "Use the first value in the list as the default value" as True.
B. Set a validation rule to enforce a value is selected.
C. Mark the field as Required on the field definition.
D. Mark the field as Required on the object's page layout.

Answer: C
Explanation:

Question: 28

Universal Container(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 ad to create the most efficient model that
supports the business need?

A. Add a Master-Detail field on the Account object to the Global Address object
B. Add a Master-Detail field on the Global Address object to the Account object.
C. Add a Lookup field on the Account object to the Global Address object.

https://www.certshero.com
Questions & Answers PDF Page 12

D. Add a Lookup field on the Global Address object to the Account object

Answer: B
Explanation:

Question: 29

What are three considerations when using the @InvocableMethod annotation in Apex?
Choose 3 answers

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


B. A method using the @InvocableMethod annotation can have multiple input parameters.
C. A method using the @InvocableMethod annotation must be declared as static
D. A method using the @InvocableMethod annotation can be declared as Public or Global.
E. Only one method using the @InvocableMethod annotqation can be defined per Apex class.

Answer: C, D, E
Explanation:

Question: 30

which statement is true regarding execution order when triggers are associated to the same object
and event?

A. Trigger execution order cannot be guaranteed.


B. executed In the order they are modified.
C. Triggers are executed alphabetically by trigger name.
D. Triggers are executed in the order they are created.

Answer: A
Explanation:

Question: 31

A developer must create a CreditcardPayment class that provides an implementation of an existing


Payment class. Public virtual class Payment { public virtual void makePayment(Decimal
amount) { /*implementation*/ } } Which is the correct implementation?

A. Public class CreditcardPayment extends Payment {

public override void makePayment(Decimal amount) { /*implementation*/ }

}
B. Public class CreditCardPayment implements Payment {

https://www.certshero.com
Questions & Answers PDF Page 13

public virtual void makePayment(Decimal amount) { /*implementation*/ }

}
C. Public class CreditCardPayment extends Payment {

public virtual void makePayment(Decimal amount) { /*implementation*/ }

}
D. Public class CreditCardPayment implements Payment {

public override void makePayment(Decimal amount) { /*Implementation*/ }

Answer: A
Explanation:

Question: 32

A develop completed modification 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?

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


B. At least one line of code must be executed for the Apex trigger.
C. All methods in the test classes must use @isTest.
D. Test methods must be declared with the testMethod keyword.

Answer: A, B
Explanation:

Question: 33

A developer is debugging the following code to determinate why Accounts are not being created
Account a = new Account(Name = 'A'); Database.insert(a, false); How should the code be altered to
help debug the issue?

A. Add a System.debug() statement before the insert method


B. Add a try/catch around the insert method
C. Set the second insert method parameter to TRUE
D. Collect the insert method return value a Saveresult variable

Answer: B
Explanation:

https://www.certshero.com
Questions & Answers PDF Page 14

Question: 34

Universal Containers hires a developer to build a custom search page to help user- 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. SOSL is able to return more records.


B. SOQL is faster for text searches.
C. SOSL is faster for tent searches.
D. SOQL is able to return more records.

Answer: C, D
Explanation:

Question: 35

Universal Container 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 …. Administrator wants to ensure the solution used is bulk safe.
Which two automation tools should a developer recommend to meet these business requirements?
Choose 2 answers

A. Scheduled Flow
B. Einstein Next Best Action
C. Record_Triggered Flow
D. Process Builder

Answer: A, C
Explanation:

Question: 36

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. AppExchange
B. Salesforce CLI
C. Visual Studio Core IDE
D. Developer Console

Answer: D
Explanation:

Question: 37

https://www.certshero.com
Questions & Answers PDF Page 15

A developer Is asked to create a Visualforce page that lists the contacts owned by the current user.
This component will be embedded In a Lightning page.
Without writing unnecessary code, which controller should be used for this purpose?

A. Standard list controller


B. Standard controller
C. Lightning controller
D. Custom controller

Answer: B
Explanation:

Question: 38

A developer has a Visualforce page and custom controller to save Account records. The developer
wants to display any validation rule violation to the user. How can the developer make sure that
validation rule violations are displayed?

A. Add cuatom controller attributes to display the message.


B. Include <apex:message> on the Visualforce page.
C. Use a try/catch with a custom exception class.
D. Perform the DML using the Database.upsert() method.

Answer: B
Explanation:

Question: 39

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

A. Query the Profile where the ID equals userInfo.getProfileID() and then use the
profile.Opportunity.getDefaultRecordType() | |method. ] |
B. Use Opportunity. SObjectType.getDescribe().getRecordTypelnfos() to get a list of record types,
and iterate through them until [ J
isDefaultRecordTypeMapping() is true. Pencil & Paper |
C. Use the Schema.userlnfo.Opportunity.getDefaultRecordType() method. <
Create the opportunity and check the opportunity.recordType before inserting, which will have the
record ID of the current Dal user's default record type.

Answer: B
Explanation:

https://www.certshero.com
Questions & Answers PDF Page 16

Question: 40

Universal Containers has a Visualforce page that displays a table of every Container_c. being ……. Is
falling with a view state limit because some of the customers rent over 10,000 containers.
What should a developer change about the Visualforce page to help with the page load errors?

A. Use Lazy loading and a transient List variable.


B. Use JavaScript remoting with SOQL Offset.
C. Implement pagination with an OffsetController.
D. Implement pagination with a StandardSetController,

Answer: D
Explanation:

Question: 41

A developer migrated functionality from JavaScript Remoting to a Lightning web component and
wants to use the existing getOpportunities() method to provide data.
What to do now?

A. The method must be decorated with (cacheable=true).


B. The method must be decorated with @AuraEnabled.
C. The method must return a JSON Object.
D. The method must return a String of a serialized JSON Array.

Answer: A
Explanation:

Question: 42

A Lightning component has a wired property, searchResults, that stores a list of Opportunities. Which
definition of the Apex method, to which the searchResults property is wired, should be used?

A. @AuraEnabled(cacheable=true)
public static List<Opportunity> search(String term) { /* implementation*/ }
B. @AuraEnabled(cacheable=true) public List<Opportunity> search(String term) {
/*implementation*/ }
C. @AuraEnabled(cacheable=false) public static List<Opportunity> search(String term) {
/*implementation*/ }
D. @AuraEnabled(cacheable=false) public List<Opportunity> search(String term) {
/*implementation*/ }

Answer: A
Explanation:

Question: 43

https://www.certshero.com
Questions & Answers PDF Page 17

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.

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. Check if all the required fields for Opportunity are being added on creation.
B. Use Database.query to query the opportunities.
C. Move the DML that saves opportunities outside the for loop.
D. Query for existing opportunities outside the for loop.

Answer: C, D
Explanation:

Question: 44

What are two ways a developer can get the status of an enquered job for a class that queueable
interface? Choose 2 answers

A. View the apex status Page


B. View the apex flex Queue
C. View the apex Jobs page
D. Query the AsyncApexJobe object

Answer: A, C
Explanation:

Question: 45

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

https://www.certshero.com
Questions & Answers PDF Page 18

screen.
What should a developer use to satisfy this requirement?

A. An Apex controller
B. An Apex REST class
C. An outbound message
D. An invocable method

Answer: B
Explanation:

Question: 46

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.loadDataO < > and reference a CSV file in a static resource.
C. Use SOQL to query the org for the required data.
D. Use Test.loadDataO and reference a JSON file in Documents.

Answer: B
Explanation:

Question: 47

How can a developer check the test coverage of active Process Builder and Flows deploying them in a
Changing Set?

A. Use the Flow properties page.


B. Use the code Coverage Setup page
C. Use the Apex testresult class
D. Use SOQL and the Tooling API

Answer: D
Explanation:

Question: 48

Universal Containers has 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. Incorporate the Salesforce Lightning Design System CSS stylesheet into the JavaScript applications.
B. Rewrite all Visualforce pages asLightning components.

https://www.certshero.com
Questions & Answers PDF Page 19

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


D. Enable Available for Lightning Experience, Lightning Communities, and the mobile app on
Visualforce pages used by the custom application.

Answer: A
Explanation:

Question: 49

Which two are best practices when it comes to component and application event handling? (Choose
two.)

A. Reuse the event logic in a component bundle, by putting the logic in the helper.
B. Use component events to communicate actions that should be handled at the application level.
C. Handle low-level events in the event handler and re-fire them as higher-level events.
D. Try to use application events as opposed to component events.

Answer: A, C
Explanation:

Question: 50

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 the HTTPCalloutMock interface.
C. Write a class that implements the WebserviceMock interface.
D. Write a class that extends WebserviceMock

Answer: B
Explanation:

Question: 51

Universal Containers recently transitioned from Classic to Lighting Experience. One of its business
processes requires certain value from the opportunity object to be sent via HTTP REST callout to its
external order management system based on a user-initiated action on the opportunity page.
Example values are as follow
Name
Amount
Account
Which two methods should the developer implement to fulfill the business requirement? (Choose 2
answers)

https://www.certshero.com
Questions & Answers PDF Page 20

A. Create a Lightning component that performs the HTTP REST callout, and use a Lightning Action to
expose the component on the Opportunity detail page.
B. Create a Process Builder on the Opportunity object that executes an Apex immediate action to
perform the HTTP REST callout whenever the Opportunity is updated.

C. Create an after update trigger on the Opportunity object that calls a helper method using
@Future(Callout=true) to perform the HTTP REST callout.

D. Create a Visualforce page that performs the HTTP REST callout, and use a Visualforce quick action
to expose the component on the Opportunity detail page.

Answer: AC
Explanation:

Question: 52

A developer wants to invoke on outbound message when a record meets a specific criteria.
Which three features satisfy this use case?
Choose 3 answer

A. Approval Process has the capacity to check the record criteria and send an outbound message
without Apex Code
B. Process builder can be used to check the record criteria and send an outbound message with Apex
Code.
C. workflows can be used to check the record criteria and send an outbound message.
D. Process builder can be used to check the record criteria and send an outbound messagewithout
Apex Code.
E. Visual Workflow can be used to check the record criteria and send an outbound message without
Apex Code.

Answer: A, B, C
Explanation:

Question: 53

Given the following Anonymous Block:

https://www.certshero.com
Questions & Answers PDF Page 21

Which one do you like?


What should a developer consider for an environment that has over 10,000 Case records?

A. The transaction will fail due to exceeding the governor limit.


B. The try/catch block will handle any DML exceptions thrown.
C. The transaction will succeed and changes will be committed.
D. The try/catch block will handle exceptions thrown by governor limits.

Answer: C
Explanation:

Question: 54

For which three items can a trace flag be configured?


Choose 3 answers

A. Process Builder
B. Visualforce
C. Apex Class
D. Apex Trigger
E. User

Answer: C, D, E
Explanation:

Question: 55

A developer has a single custom controller class that works with a Visualforce Wizard to support
creating and editing multiple subjects. 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. insert pageRef.
B. Test.setCurrentPage(pageRef);
C. public ExtendedController(ApexPages StandardController cntrl) { }
D. ApexPages.CurrentPage().getParameters().put('input\’, 'TestValue');
E. String nextPage - controller.save().getUrl();

https://www.certshero.com
Questions & Answers PDF Page 22

Answer: B, D, E
Explanation:

Question: 56

A developer is creating an app that contains multiple Lightning web components.


One of the child components is used for navigation purposes. When a user click a button called..
component, the parent component must be alerted so it can navigate to the next page.
How should this be accomplished?

A. Fire a notification.
B. Update a property on the parent.
C. Call a method in the Apex controller.
D. Create a custom event.

Answer: D
Explanation:

Question: 57

A developer is implementing an Apex class for a financial system. Within the class, the
variables ‘creditAmount’ and ‘debtAmount’ 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 static keyword and assign its value in a static initializer.

D. Use the final keyword and assign its value when declaring the variable.

Answer: BD
Explanation:

Question: 58

If apex code executes inside the execute() method of an Apex class when implementing the
Batchable interface, which statement are true regarding governor limits? Choose 2 answers

A. The Apex governor limits might be higher due to the asynchronous nature of the transaction.
B. The apex governor limits are reset for each iteration of the execute() method.
C. The Apex governor limits are relaxed while calling the constructor of the Apex class.
D. The Apex governor limits cannot be exceeded due to the asynchronous nature of the transaction,

https://www.certshero.com
Questions & Answers PDF Page 23

Answer: A, B
Explanation:

Question: 59

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

Answer: B
Explanation:

Question: 60

A developer created a custom order management app that uses an Apex class. The order is
represented by an Order object and an Orderltem 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 Orderltem records to a new
Order record?

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


B. Add without sharing to the Apex class declaration.
C. Create a junction object between Orderltem and Order.
D. Select the Allow reparenting option on the master-detail relationship.

Answer: D
Explanation:

Question: 61

Universal Containers has a support process that allows users to request support from its engineering
team using a custom object, Engineering_Support__c.
Users should be able to associate multiple engineering_Support__c records to a single Opportunity
record.
Additionally, aggregate Information about the Engineering_support__c records should be shown on
the
Opportunity record.
What should a developer Implement to support these requirements?

A. Master-detail field from Engineering_Support__c to Opportunity.

https://www.certshero.com
Questions & Answers PDF Page 24

B. Master-detail field from Opportunity to Engineering_Support__c


C. Lookup field from Engineering_support__c to Opportunity
D. Lookup field from Opportunity to Engineering_Support__c

Answer: A
Explanation:

Question: 62

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. approval process on the Opportunity object
D. An error condition formula on a validation rule on Opportunity

Answer: D
Explanation:

Question: 63

Which two events need to happen when deploying to a production org? Choose 2 answers
A. All triggers must have at least 1% test coverage.
B. All Apex code must have at least 75% test coverage.
C. All triggers must have at least 75% test coverage.
D. All test and triggers must have at least 75% test coverage combined
Answer: AB
Explanation:

Question: 64
Which three operations affect the number of times a trigger can fire?
Choose 3 answers

A. Process Flows
B. Workflow Rules
C. Criteria-based Sharing calculations
D. Email messages
E. Roll-Up Summary fields

Answer: A, B, E
Explanation:

Question: 65

https://www.certshero.com
Questions & Answers PDF Page 25

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)

B)

C)

D)

A. Option A
B. Option B
C. Option C
D. Option D

Answer: C
Explanation:

Question: 66

What is the result of the following code?

A. The record will not be created and a exception will be thrown.


B. The record will be created and a message will be in the debug log.
C. The record will not be created and no error will be reported.
D. The record will be created and no error will be reported.

https://www.certshero.com
Questions & Answers PDF Page 26

Answer: C
Explanation:

Question: 67

Universal Containers 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 CEILING formula on each of the Latest availability date fields.


B. Use a DAYS formula on each of the availability date fields and a COUNT Roll-Up Summary field on
the Order.
C. Use a LATEST formula on each of the latest availability date fields.
D. Use a Max Roll-Up Summary field on the Latest availability date fields.

Answer: D
Explanation:

Question: 68

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 Loader runs from the developer's browser.


B. Data Import Wizard does not support Opportunities.
C. Data Loader automatically relates Opportunities to Accounts.
D. Data Import Wizard can not import all 500 records.

Answer: B
Explanation:

Question: 69

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

Answer: C
Explanation:

Question: 70

https://www.certshero.com
Questions & Answers PDF Page 27

A developer must modify the following code snippet to prevent the number of SOQL queries issued
from exceeding the platform governor limit. public class without sharing OpportunityService( public
static List<OpportunityLineItem> getOpportunityProducts(Set<Id> opportunityIds){
List<OpportunitylineItem> oppLineItems = new List<OpportunityLineItem>(); for(Id thisOppId :
opportunityIds){ oppLineItems.addAll([Select Id FROM OpportunityLineItems 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. Use the System.Limits.getQueries() method to ensure the number of queries is less than 100.
B. Use the System.Limits.getlimitQueries() method to ensure the number of queries is less than 100.
C. Refector the code above to perform the SOQL query only if the Set of opportunityIds contains less
100 Ids.
D. Refactor the code above to perform only one SOQL query, filtering by the Set of opportunityIds.

Answer: D
Explanation:

Question: 71

Universal Container is building a recruiting app with an Applicant object that stores information
about an individual person that represents a job. Each application 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. Formula field on Applicant that references Job
C. Junction object between Applicant and Job
D. Lookup field from Applicant to Job

Answer: A
Explanation:

Question: 72

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. Roll-Up Summaries

B. Triggers

C. Relationships

D. Process Builder

https://www.certshero.com
Questions & Answers PDF Page 28

E. Custom Objects and Fields

Answer: A, C, D
Explanation:

Question: 73

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

Answer: A
Explanation:

Question: 74

Refer to the following code snippet for an environment has more than 200 Accounts belonging to the
Technology' industry:

When the code execution, which two events occur as a result of the Apex transaction?
When the code executes, which two events occur as a result of the Apex transaction?
Choose 2 answers

A. If executed in an asynchronous context, the apex transaction is likely to fall by exceeding the DML
governor limit
B. The Apex transaction succeeds regardless of any uncaught exception and all processed accounts
are updated.
C. The Apex transaction fails with the following message. "SObject row was retrieved via SOQL
without querying the requested field Account.Is.Tech__c''.
D. If executed In a synchronous context, the apex transaction is likely to fall by exceeding the DHL
governor limit.

Answer: A
Explanation:

Question: 75

https://www.certshero.com
Questions & Answers PDF Page 29

Which three statements are true regarding custom exceptions in Apex? (Choose three.)

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 cannot contain member variables or methods.
D. A custom exception class name must end with “Exception”.
E. A custom exception class can extend other classes besides the Exception class.

Answer: B, D, E
Explanation:

Question: 76

A developer observes that an Apex test method fails in the Sandbox. To identify the issue, the
developer copies the code inside the test method and executes it via the Execute Anonymous tool in
the Developer Console. The code then executes with no exceptions or errors. Why did the test
method fail in the sandbox and pass in the Developer Console?

A. The test method has a syntax error in the code.


B. The test method relies on existing data in the sandbox.
C. The test method is calling an @future method.
D. The test method does not use System.runAs to execute as a specific user.

Answer: B
Explanation:

Question: 77

Which Apex class contains methods to return the amount of resources that have been used for a
particular governor, such as the number of DML statements?

A. Exception
B. Messaging
C. OrgLimits
D. Limits

Answer: D
Explanation:

Question: 78

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

https://www.certshero.com
Questions & Answers PDF Page 30

Choose 2 answers

A. The field values on the master record are overwritten by the records being merged.
B. Merge is supported with accounts, contacts, cases, and leads.
C. External ID fields can be used with the merge method.
D. 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.

Answer: B, D
Explanation:

Question: 79

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. Ensure that the order number in the OMS is unique.


B. Use the order number from the OMS as an external ID.
C. Use the email on the contact record as an external ID.
D. Write a before trigger on the order object to delete any duplicates.

Answer: A, D
Explanation:

Question: 80

Which two statements are true about using the @testSetup annotation in an Apex test class?
Choose 2 answers

A. Records created in the test setup method cannot be updated in individual test methods.
B. Qo The @testSetup annotation is not supported when the GisTest(SeeAllData=True) annotation is
used.
C. Test data is inserted once for all test methods in a class.
D. A method defined with the @testSetup annotation executes once for each test method in the test
class and counts towards system limits.

Answer: B, D
Explanation:

Question: 81

https://www.certshero.com
Questions & Answers PDF Page 31

A primaryid_c custom field exists on the candidate_c custom object. The filed 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. Create a Process Builder on the Candidate_c object to map the records.


B. Create a before Insert trigger to correctly map the records.
C. Update the primaryid__c field definition to mark it as an External Id
D. Upload the CSV into a custom object related to Candidate_c.

Answer: C
Explanation:

Question: 82

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 it's trainers?

A. SELECT Id, (SELECT Id FROM Trainers) FROM Gym_C WHERE Name . Viridian City Gym'
B. SELECT Id, (SELECT Id FROM Trainer_c) FROM Gym_c WHERE Name - Viridian City Gym'
C. SELECT ID FROM Trainer_c WHERE Gym__r.Name - Viridian City Gym'
D. SELECT Id, (SELECT Id FROM Trainers) FROM Gym_C WHERE Name - Viridian City Gym'

Answer: A
Explanation:

Question: 83

What are two ways for a developer to execute tests in an org?

A. Tooling API
B. Developer console
C. Bulk API
D. Matadata API

Answer: A, B
Explanation:

Question: 84

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

https://www.certshero.com
Questions & Answers PDF Page 32

• case_Defect__c: a junction object between Case and Defector to represent that a defect Is a
customer issue
What should be done to share a specific Case-Defect_c record with a user?

A. Share the Case_Defect_c record.


B. Share the parent Case record.
C. Share the parent Defect_c record.
D. Share the parent Case and Defect_c records.

Answer: D
Explanation:

Question: 85

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 child object and use a red-black tree sorting to sum the amount for all
related child objects under the Opportunity.
B. Write a Process Builder that links the custom object to the Opportunity.
C. Write a trigger on the child object and use an aggregate function to sum the amount for all related
child objects under the Opportunity
D. Use the Streaming API to create real-time roll-up summaries.

Answer: C
Explanation:

Question: 86

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 levelpermissions
on salary__C?
A. <ligthning-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="Salary__c">
</lightning-input-currency>
Answer: A
Explanation:

https://www.certshero.com
Questions & Answers PDF Page 33

Question: 87
A developer is tasked to perform a security review of the ContactSearch Apex class that exists in the
system. Whithin the class, the developer identifies the following method as a security threat:
List<Contact> performSearch(String lastName){ return Database.query('Select Id, FirstName,
LastName FROM Contact WHERE LastName Like %'+lastName+'%); } What are two ways the
developer can update the method to prevent a SOQL injection attack? Choose 2 answers

A. Use variable binding and replace the dynamic query with a static SOQL.
B. Use the escapeSingleQuote method to sanitize the parameter before its use.
C. Use a regular expression on the parameter to remove special characters.
D. Use the @Readonly annotation and the with sharing keyword on the class.

Answer: AB
Explanation:

Question: 88

A developer created these three Rollup Summary fields in the custom object, Project_ct,

The developer is asked to create a new field that shows the ratio between rejected and approved
timesheets for a given project.
Which should the developer use to Implement the business requirement in order to minimize
maintenance overhead?

A. Record-triggered Flow
B. Formula field
C. Apex Trigger
D. Process Builder

Answer: B
Explanation:

Question: 89

Which three Salesforce resources can be accessed from a Lightning web component?
Choose 3 answers

A. SVG resources
B. Third-party web components
C. Content asset files
D. Static resources
E. All external libraries

https://www.certshero.com
Questions & Answers PDF Page 34

Answer: A, D, E
Explanation:

Question: 90

An org tracks customer orders on an Order object and the items of an Order on the Line Item object.
The Line Item object has a MasterDetail 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 numeric formula field and the order amount as a roll-up summary
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. Implement the Line amount as a currency field and the order amount as a SUM formula field.
D. Write a process on the Line item that calculates the item amount and order amount and updates
the filed on the Line Item and the order.

Answer: C
Explanation:

Question: 91

Which action may cause triggers to fire?

A. Updates to Feed Items


B. Renaming or replacing a picklist entry
C. Changing a user's default division when the transfer division option is checked
D. Cascading delete operations

Answer: A
Explanation:

Question: 92

The following code snippet is executed by a Lightning web component in an environment with more
than 2,000 lead records:

https://www.certshero.com
Questions & Answers PDF Page 35

Which governor limit will likely be exceeded within the Apex transaction?

A. Total number of DML statement issued


B. Total number of SOQL queries issued
C. Total number of records retrieved by SOQL queries
D. Total number of records processed as a result of DML statements

Answer: C
Explanation:

Question: 93

Which scenario is valid for execution by unit tests?

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


B. Set the created date of a record using a system method.
C. Execute anonymous Apex as a different user.
D. Generate a Visualforce PDF with geccontentAsPDF ().

Answer: B
Explanation:

Question: 94

Which Lightning code segment should be written to declare dependencies on a Lightning


component, c:accountList, that is used in a Visualforce page?
A)

B)

C)

https://www.certshero.com
Questions & Answers PDF Page 36

D)

A. Option A
B. Option B
C. Option C
D. Option D

Answer: A
Explanation:

Question: 95

A developer has an integer variable called maxAttempts. The developer meeds to ensure that once
maxAttempts is initialized, it preserves its value for the lenght of the Apex transaction; while being
able to share the variable's state between trigger executions. How should the developer declare
maxAttempts to meet these requirements?

A. Declare maxattempts as a member variable on the trigger definition.


B. Declare maxattempts as a private static variable on a helper class
C. Declare maxattempts as a constant using the static and final keywords
D. Declare maxattempts as a variable on a helper class

Answer: C
Explanation:

Question: 96

Consider the following code snippet:

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.

https://www.certshero.com
Questions & Answers PDF Page 37

B. Avoid returning an empty List of records.


C. Avoid using variables as query filters.
D. Avoid performing queries inside for loops.

Answer: D
Explanation:

Question: 97

What does the Lightning Component framework provide to developers?

A. Extended governor limits for applications


B. Prebuilt component that can be reused.
C. Templates to create custom components.
D. Support for Classic and Lightning UIS.

Answer: B
Explanation:

Question: 98

In the Lightning UI, where should a developer look to find information about a Paused Flow
Interview?

A. On the Paused Row Interviews related List for a given record


B. In the Paused Interviews section of the Apex Flex Queue
C. In the system debug log by Altering on Paused Row Interview
D. On the Paused Row Interviews component on the Home page

Answer: B
Explanation:

Question: 99

Which two are phases in the Aura application event propagation framework? Choose 2 answers

A. Emit
B. Control
C. Default
D. Bubble

Answer: C, D
Explanation:

Question: 100

https://www.certshero.com
Questions & Answers PDF Page 38

Which two sfdx commands can be used to add testing data to a Developer sandbox?

A. Forced: data:bulk:upsert
B. Forced: data: object :upsert
C. Forced: data: tree: upsert
D. Forced: data:async:upsert

Answer: A, C
Explanation:

Question: 101

As part of a data cleanup strategy, AW Computing wants to proactively delete associated opportunity
records when the related Account is deleted.
Which automation tool should be used to meet this business requirement?

A. Workflow Rules
B. Scheduled job
C. Record-Triggered Flow
D. Process Builder

Answer: C
Explanation:

Question: 102

What are three ways for a developer to execute tests in an org? Choose 3.
A. Bulk API
B. Tooling API
C. Setup Menu
D. Salesforce DX
E. Metadata API.
Answer: B, C, D
Explanation:
https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_testing.htm
https://developer.salesforce.com/docs/atlas.en-
us.api_tooling.meta/api_tooling/tooling_api_objects_apextestsuite.htm

Question: 103
Which two settings must be defined in order to update a record of a junction object? Choose 2
answers

A. Read access on the primary relationship


B. Read/Write access on the secondary relationship
C. Read/Write access on the primary relationship
D. Read/Write access on the junction object

https://www.certshero.com
Questions & Answers PDF Page 39

Answer: B, C
Explanation:

Question: 104

What should be used to create scratch orgs?

A. Developer Console
B. Salesforce CLI
C. Workbench
D. Sandbox refresh

Answer: B
Explanation:

Question: 105

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

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 if (Schema, sobjectType, Contact, isUpdatable ( ) )


B. Use if (Schema , sobjectType. Contact. Field, Is_Active_c. is Updateable ( ) )
C. Use if (Schema.sObjectType.Contact.isAccessible ( ) )
D. Use if (thisContact.Owner = = UserInfo.getuserId ( ) )

Answer: A, B
Explanation:

Question: 106

Which salesforce org has a complete duplicate copy of the production org including data and
configuration?

https://www.certshero.com
Questions & Answers PDF Page 40

A. Developer Pro Sandbox


B. Partial Copy Sandbox
C. Production
D. Full Sandbox

Answer: D
Explanation:

Question: 107

A Salesforce Administrator is creating a record-triggered flow. When certain criteria are met, the flow
must call an Apex method to execute 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. @RemoteAction
C. @InvocableMethod
D. @AuraEnaled

Answer: C
Explanation:

Question: 108

When a user edits the Postal Code on an Account, a custom Account text field named ''Timezone''
must be updated based on the values in a postalCodeToTimezone_c custom object.
What should be built to implement this feature?

A. Account custom trigger


B. Account approval process
C. Account assignment rule
D. Account workflow rule

Answer: A
Explanation:

Question: 109

The values 'High', 'Medium', and 'Low' are Identified as common values for multiple picklist across
different object. What is an approach a developer can take to streamline maintenance of the picklist
and their values, while also restricting the values to the ones mentioned above?

A. Create the Picklist on each object and use a Global Picklist Value Set containing the Values.
B. Create the Picklist on each object as a required field and select "Display values alphabeticaly, not
in the order entered".

https://www.certshero.com
Questions & Answers PDF Page 41

C. Create the Picklist on each object and select "Restrict picklist to the values defined in the value
set".
D. Create the Picklist on each and add a validation rule to ensure data integrity.

Answer: A
Explanation:

Question: 110

In terms of the MVC paradigm, what are two advantages of implementing the layer of a Salesforce
application using Aura Component-based development over Visualforce? Choose 2 answers

A. Self-contained and reusable units of an application


B. Rich component ecosystem
C. Automatic code generation
D. Server-side run-time debugging

Answer: A, B
Explanation:

Question: 111

A lead developer creates an Apex interface called "Laptop". Consider the following code snippet:

How can a developer use the Laptop Interface within the Silvertaptop class?

A. @Extends(class=Laptop'')
public class SilverLaptop
B. public calss SilverLaptop extends Laptop
C. @Interface (class=''Laptop'')
public class SilverLaptop
D. public class Silverlaptop implements Laptop

Answer: B
Explanation:

Question: 112

Assuming that naze is 8 String obtained by an <apex:inpotText> tag on 8 Visualforce page, which two
SOQL queries performed are safe from SOQL injection?
‘Choose 2 answers
A)

https://www.certshero.com
Questions & Answers PDF Page 42

B)

C)

D)

A. Option A
B. Option B
C. Option C
D. Option D

Answer: C, D
Explanation:

Question: 113

Refer to the following Apex code:

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

A. 0
B. 1
C. 2
D. 3

Answer: C
Explanation:

Question: 114

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

A. Renaming or replacing picklist


B. Importing data using the Data Loader and the Bulk API
C. Converting Leads to Contact accounts

https://www.certshero.com
Questions & Answers PDF Page 43

D. Updating addresses using the Mass Address update tool

Answer: B
Explanation:

Question: 115

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 component in Lightning Experience


B. A Lightning component in 5alesforce Classic and a Lightning component in lightning Experience
C. A Visualforce page in Salesforce Classic and a Lightning page in Lightning Experience
D. A Lightning page in Salesforce Classic and a Visualforce page in Lightning Experience

Answer: A
Explanation:

Question: 116

AW Computing tracks order information in custom objects called order__c and order_Line_ c -
Currently, all shipping information is stored in the order__c object.
The company wants to expand Its order application to support split shipments so that any number of
order_Line__c records on a single order__c can be shipped to different locations.
What should a developer add to fulfill this requirement?

A. Order_shipment_Group_c object and master-detail field on order_Line_c


B. Order_shipment_Group_c object and master-detail field on order_c
C. Order_shipment_Group_c object and master-detail field to order_c and Order Line_c
D. Order_shipment_Group_c object and master-detail field on order_shipment_Group_c

Answer: C
Explanation:

Question: 117

What should a developer use to obtain the Id and Name of all the Leads. Accounts, and Contacts that
hove the company name "Universal Containers"?

A. FIND 'Universal Containers' IN Name Fields RETURNING leadjid, name), accounted, name),
contacted, name)
B. FIND Universal Containers' IN CompanyName Fietds RETURNING lead{ld. name), accounted,
name), contacted, name)
C. SELECT lead(id, name). accountOd, name), contacted, name) FROM Lead, Account, Contact
WHERE Name = "universal Containers'

https://www.certshero.com
Questions & Answers PDF Page 44

D. SELECT Lead.id. Lead.Name, Account.Id, AccountName, Contacted, Contact.Name FROM Lead,


Account, Contact WHERE CompanvName * Universal Containers'

Answer: A
Explanation:

Question: 118

Which three code lines are required to create a Lightning component on a Visualforce page? Choose
3 answers

A. $Lightning.createComponent
B. <apex:slds/>
C. $Lightning.useComponent
D. $Lightning.use
E. <apex:includeLightning/>

Answer: A, D, E
Explanation:

Question: 119

Which aspect of Apex programming is limited due to multitenancy?

A. The number of active Apex classes


B. The number of methods in an Apex Class
C. The number of records processed in a loop
D. The number of records returned from database queries

Answer: D
Explanation:

Question: 120

A development team wants to use a deployment script lo automatically deploy lo 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. Ant Migration Tool


B. SFDX CLI
C. Change Sets
D. Developer Console

Answer: A, B
Explanation:

https://www.certshero.com
Questions & Answers PDF Page 45

Question: 121

A developer has a 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. ApexPages.currentPage() .getParameters() .get('url_param') .escapeHtml4()
C. String.ValueOf(ApexPages.currentPage() .getParameters() .get('url_param'))
D. String.escapeSingleQuotes(ApexPages.currentPage() .getParameters(). get('url_param'))

Answer: B
Explanation:

Question: 122

A developer created a new trigger that inserts a Task when a new Lead is created. After deploying to
production, an outside integration chat reads task records is periodically reporting errors.
Which change should the developer make to ensure the integration is not affected with minimal
impact to business logic?

A. Deactivate the trigger before the integration runs.


B. Use a try-catch block after the insert statement.
C. Remove the Apex class from the integration user's profile.
D. Use the Database method with all or None set to false

Answer: C
Explanation:

Question: 123

A developer creates a new Apex trigger with a helper class, and writes a test class that only exercises
95% coverage of new Apex helper class. Change Set deployment to production fails with the test
coverage warning: "Test coverage of selected Apex Trigger is 0%, at least 1% test coverage is
required" What should the developer do to successfully deploy the new Apex trigger and helper
class?

A. Create a test class and methods to cover the Apex trigger


B. Run the tests using the 'Run All Tests' method.
C. Remove the falling test methods from the test class.
D. Increase the test class coverage on the helper class

Answer: C
Explanation:

Question: 124

https://www.certshero.com
Questions & Answers PDF Page 46

The following automations already exist on the Account object;


• A workflow rule that updates a field when a certain criteria is met
• A custom validation on a field
• A How that updates related contact records
A developer created a trigger on the Account object.
What should the developer consider while testing the trigger code?

A. The flow may be launched multiple times.


B. Workflow rules will fire only after the trigger has committed all DML operations to the database.
C. A workflow rule field update will cause the custom validation to run again.
D. The trigger may fire multiple times during a transaction.

Answer: D
Explanation:

Question: 125

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.

Answer: A, B
Explanation:

Question: 126

Einstein Next Best Action Is configured at Universal Containers to display recommendations to


internal users on the Account detail page.
If the recommendation is approved, a new opportunity record and task should be generated. If the
recommendation is rejected, an Apex method must be executed to perform a callout to an external
system.
Which three factors should a developer keep Hi mind when implementing the Apex method?
Choose 3 answers

A. The method must use the @AuraEnabled annotation.


B. The method must use the @Future annotation.

https://www.certshero.com
Questions & Answers PDF Page 47

C. The method must use the @invocableMethod annotation.


D. The method must be defined as static.
E. The method must be defined as public.

Answer: B, D, E
Explanation:

Question: 127

What are three ways for 2 developer to execute tests in an org? Choose 3 answers

A. Metadata APT
B. Bulk API
C. Setup Menu
D. SalesforceDX
E. Tooling API

Answer: C, D, E
Explanation:

Question: 128

A developer created a trigger on the Account object and wants to test if the trigger is properly
bulklfield. The developer team decided that the trigger should be tested with 200 account records
with unique names.
What two things should be done to create the test data within the unit test with the least amount of
code? Choose 2 answers
A developer created a trigger on the Account object and wants to test if the trigger is properly
bulklfield. The developer team decided that the trigger should be tested with 200 account records
with unique names.
What two things should be done to create the test data within the unit test with the least amount of
code?
Choose 2 answers

A. Use the @isTest(isParallel=true) annotation in the test class.


B. Use Test.loadData to populate data in your test methods.
C. Use the @isTest(seeAllData=true) annotation in the test class.
D. Create a static resource containing test data.

Answer: B, D
Explanation:

Question: 129

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

https://www.certshero.com
Questions & Answers PDF Page 48

needs to retrieve a list containing all Contact records where the related Account Industry is
‘Technology’ while also retrieving the contact’s Job_Application__c records.
Based on the object’s relationships, what is the most efficient statement to retrieve the list of
contacts?

A. [SELECT Id, (SELECT Id FROM Job_Applications_r) FROM Contact WHERE


Account.Industry = ‘Technology’];
B. [SELECT Id, (SELECT Id FROM Job_Applications_r) FROM Contact WHERE
Accounts.Industry = ‘Technology’];
C. [SELECT Id, (SELECT Id FROM Job_Applications_c) FROM Contact WHERE
Accounts.Industry = ‘Technology’];
D. [SELECT Id, (SELECT Id FROM Job_Application_c) FROM Contact WHERE
Account.Industry = ‘Technology’];

Answer: B
Explanation:

Question: 130

A developer is creating a test coverage for a class and needs to insert records to validate
functionality. Which method annotation should be used to create records for every method in the
test class?

A. @BeforeTest
B. @isTest(SeeAllData=True)
C. @TestSetup
D. @PreTest

Answer: C
Explanation:

Question: 131

An Apex method, getAccounts, that returns a list of Accounts given a searchTern, 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)

B)

C)

https://www.certshero.com
Questions & Answers PDF Page 49

D)

A. Option A
B. Option B
C. Option C
D. Option D

Answer: C
Explanation:

Question: 132

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

Answer: C
Explanation:

Question: 133

For which three items can 2 trace flag be configured?


Choose 3 answers

A. Flow
B. Apex Class
C. User
D. Apex Trager
E. Visualforce

Answer: B, C, D
Explanation:

Question: 134

Which three steps allow a custom SVG to be included in a Lightning web component? Choose 3

https://www.certshero.com
Questions & Answers PDF Page 50

answers

A. Upload the SVG as a static resource.


B. Import the static resource and provide a getter for it in JavaScript.
C. Reference the getter in the HTML template.
D. Reference the import in the HTML template.
E. Import the SVG as a content asset file.

Answer: A, B, C
Explanation:

Question: 135

How does the Lightning Component framework help developers implement solutions faster?

A. By providing an Agile process with default steps


B. By providing code review standards and processes
C. By providing device-awareness for mobile and desktops
D. By providing change history and version control

Answer: C
Explanation:

Question: 136

What should a developer do to check the code coverage of a class after running all tests?

A. View the code coverage percentage or the class using the Overalll code Coverage panel in the
Developer Console Test tab.
B. View the Code Coverage column in the list on the Apex Classes page.
C. Select and run the class on the Apex est Execution page in the Developer Console.
D. View the Class test Percentage tab on the Apex Class list view in Salesforce Setup.

Answer: D
Explanation:

Question: 137

Cloud kicks has a muli-screen flow 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 number and dates
that are retrieved from an external odrer management system in real time and displayed on the
screen.
What shuold a developer use to satisfy this requirement?

A. An invocae method

https://www.certshero.com
Questions & Answers PDF Page 51

B. An apex REST class


C. An outbound message
D. An Apex Controller

Answer: B
Explanation:

Question: 138

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 controller
B. An Apex REST class
C. An outbound message
D. An invocable method

Answer: B
Explanation:

Question: 139

Universal Containers has a Visualforce page that displays a table of every Container_c. being ……. Is
falling with a view state limit because some of the customers rent over 10,000 containers.
What should a developer change about the Visualforce page to help with the page load errors?

A. Use Lazy loading and a transient List variable.


B. Use JavaScript remoting with SOQL Offset.
C. Implement pagination with an OffsetController.
D. Implement pagination with a StandardSetController,

Answer: D
Explanation:

Question: 140

A developer considers the following snippet of code:

https://www.certshero.com
Questions & Answers PDF Page 52

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

A. 3
B. 1
C. 4
D. 2

Answer: C
Explanation:

Question: 141

A developer is creating a Lightning web component to showa 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 WITH SECURITY_ENFORCED in the SOQL that fetches the data for the component.
B. Use Security. stripInaccessible to remove fields inaccessible to the current user.
C. Use Lightning Data Service to get the collection of sales records.
D. Use Lightning Locker Service to enforce sharing rules and field-level security.

Answer: B
Explanation:

Question: 142

A developer created these three Rollup Summary fields in the custom object, Project__c:

https://www.certshero.com
Questions & Answers PDF Page 53

The developer is asked to create a new field that shows the ratio between rejected and approved
timesheets for a given project.
Which should the developer use to implement the business requirement in order to minimize
maintenance overhead?

A. Record-triggered flow
B. Formula field
C. Apex trigger
D. Field Update actions

Answer: B
Explanation:

Question: 143

The sales management team at Universal Container requires that the Lead Source field of the Lead
record be populated when a.. converted.
What should be done to ensure that a user populates the Lead Source field prior to converting a
Lead?

A. Use a formula field.


B. Use a validation rule.
C. Use Lead Conversation field mapping.
D. Create an after trigger on Lead.

Answer: B
Explanation:

Question: 144

Which code statement includes an Apex method named updateaccounts in the Class AccountCont
rolles for use in a Lightning web component?
A)

B)

C)

D)

https://www.certshero.com
Questions & Answers PDF Page 54

A. Option A
B. Option B
C. Option C
D. Option D

Answer: D
Explanation:

Question: 145

n org has an existing flow that creates an Opportunity with an Update Records element. A developer
must update the flow to aiso create a ‘Contact and store the created Contact's 1D on the
Opportunity.
Which update must the developer make in the flow?

A. Add a new Get Records element.


B. Add a new Create Records element.
C. Add a new Update Records element.
D. Add a new Roll back Records element

Answer: B
Explanation:

Question: 146

A company has a custom object, Sales, }_Help_Request__c, that has a Lookup relationship to
Opportunity. The Seles Help Request__c has a mumber field, Number_ct_Hours__c, that represents
the amount of time spent on the Sales_Help Request__C.
A developer is tasked with creating a field, total_Hour2__c, on Opportunity that should be the sum
of all of the Number_of_Hours_c values for the Sales_Help_Request__c records related to that
Opportunity.
What should the developer use to implement this?

A. A roll-up summary field on the sales Help_Request__c object


B. A trigger on the Opportunity object
C. A roll-up summary field on the Opportunity object
D. A record-triggered flow on the Sales Help Request__c object

Answer: B
Explanation:

Question: 147

A developer wrote an Apex method to update a list of Contacts and wants to make it available for use
by Lightning web components.

https://www.certshero.com
Questions & Answers PDF Page 55

Which annotation should the developer add to the Apex method to achieve this?
A)

B)

C)

D)

A. Option
B. Option
C. Option
D. Option

Answer: B
Explanation:

Question: 148

niversal Containers (UC) processes orders in Salesforce in a custom object, Crder_c. They also allow
sales reps to upload CSV files with
of orders at a time.
A developer is tasked with integrating orders placed in Salesforce with UC's enterprise resource
planning (ERP) system.
‘After the status for an Craer__c is first set to "Placed’, the order information must be sent to a REST
endpoint in the ERP system that can
process ne order at a time.
What should the developer implement to accomplish this?

A. Callout from an §urare method called from a trigger


B. Callout from a Sarchabie class called from a scheduled job
C. Flow with 2 callout from an invocable method
D. Callout from a queseatie class called from a trigger

Answer: A
Explanation:

Question: 149

A developer must implement a CheckPaymentProcessor class that provides check processing


payment capabilities that adhere to what defined for payments in the PaymentProcessor interface.
public interface PaymentProcessor { void pay(Decimal amount); } Which is the correct
implementation to use the PaymentProcessor interface class?

https://www.certshero.com
Questions & Answers PDF Page 56

A. Public class CheckPaymentProcessor implements PaymentProcessor {

public void pay(Decimal amount) {}

}
B. Public class CheckPaymentProcessor implements PaymentProcessor {

public void pay(Decimal amount);

}
C. Public class CheckPaymentProcessor extends PaymentProcessor {

public void pay(Decimal amount);

}
D. Public class CheckPaymentProcessor extends PaymentProcessor {

public void pay(Decimal amount) {}

Answer: B

Explanation:

https://www.certshero.com
Questions & Answers PDF Page 57

Thank You for Purchasing PDI PDF

Download Free Practice Test Demo from Here:


https://www.certshero.com/PDI.html

Test Your Preparation with


Practice Exam Software
Use Coupon “20OFF” for extra 20% discount on purchase of
Practice Test Software. Practice Exam Software helps you validate
your preparation in simulated exam environment.

https://www.certshero.com

You might also like