Pre Black Friday Sale Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: 70special

Salesforce PDI Platform Developer I (SP23) Exam Practice Test

Page: 1 / 17
Total 167 questions

Platform Developer I (SP23) Questions and Answers

Testing Engine

  • Product Type: Testing Engine
$36  $119.99

PDF Study Guide

  • Product Type: PDF Study Guide
$31.5  $104.99
Question 1

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

Options:

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.

Question 2

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?

Options:

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

Question 3

What are three capabilities of the tag when loading JavaScript resources in Aura components?

Choose 3 answers

Options:

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

Question 4

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?

Options:

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 cannot import all 500 records.

Question 5

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)

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Question 6

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?

Options:

A.

B.

C.

D.

Question 7

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

Options:

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

Question 8

What are three ways for a developer to execute tests in an org? Choose 3.

Options:

A.

Bulk API

B.

Tooling API

C.

Setup Menu

D.

Salesforce DX

E.

Metadata API.

Question 9

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?

Options:

A.

Exception

B.

Messaging

C.

OrgLimits

D.

Limits

Question 10

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

Options:

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.

Question 11

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

Options:

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.

Question 12

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?

Options:

A.

AppExchange

B.

Salesforce CLI

C.

Visual Studio Core IDE

D.

Developer Console

Question 13

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

Options:

A.

Tooling API

B.

Developer console

C.

Bulk API

D.

Matadata API

Question 14

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?

Options:

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

Question 15

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?

Options:

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

Question 16

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?

Options:

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

Question 17

What writing an Apex class, a developer warts to make sure thai 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 tospecification?

Options:

A.

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

B.

Include a savepoint and Database,rollback.

C.

Include a try/catch block to the Apex class.

D.

Run the code in an Execute Anonymous block n the Deceloper Consider.

Question 18

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?

Options:

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

Question 19

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

Options:

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.

Question 20

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

Options:

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

Question 21

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?

Options:

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,

Question 22

Which two events need to happen when deploying to a production org? Choose 2 answers

Options:

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

Question 23

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

Choose 3 answers

Options:

A.

SVG resources

B.

Third-party web components

C.

Content asset files

D.

Static resources

E.

All external libraries

Question 24

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

Choose 2 answers

Options:

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.

Question 25

What are three characteristics of change set deployments?

Choose 3 answers

Options:

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.

Question 26

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?

Options:

A.

Fire a notification.

B.

Update a property on the parent.

C.

Call a method in the Apex controller.

D.

Create a custom event.

Question 27

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?

Options:

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.

Question 28

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?

Options:

A.

Developer sandboxes

B.

Scratch orgs

C.

Full Copy sandboxes

D.

Developer orgs

Question 29

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

Which two automationtools can be used to implement this feature?

Choose 2 answers

Options:

A.

Approval process

B.

Fast field Updates record-triggered flow

C.

Quick actions

D.

Account trigger

Question 30

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?

Options:

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

Question 31

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

Options:

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

Question 32

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

Options:

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

Question 33

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?

Options:

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

Question 34

A developer created this Apex trigger that calls MyClass,myStartmethod:

The developer creates a test method that calls MyClase,myStartmethod directly, resulting in 81% overall code coverage.

What happens wtier the developer tries to deploy the ... and two classes to production, assuming no other code exists?

Options:

A.

The deployment fails because the Apr- MgQM has no code coverage.

B.

The deployment tails because no assertions mett made in the lest method.

C.

The deployment passes became the Apex code has the requited 75% code coverage.

D.

The deployment passes because both classes and the trigger were included ki the deployment.

Question 35

Given the following Anonymous Block:

Which one do you like?

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

Options:

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.

Question 36

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)

D)

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Question 37

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?

Options:

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.

Question 38

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?

Options:

A.

1

B.

3

C.

4

D.

2

Question 39

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?

Options:

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

Question 40

Assuming that naze is 8 String obtained by an tag on 8 Visualforce page, which two SOQL queries performed are safe from SOQL injection?

‘Choose 2 answers

A)

B)

C)

D)

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Question 41

Uniersal Containers (UC) is developing a process for their sales teams that requires all sales reps to go through a set of scripted steps with each new customer they create.

In the first steps of collecting information, UC’s ERP system must be checked via as a REST endpoint to see if the customerexists. If the customer exists, the data must be presented to the sales rep in Salesforce.

Which two should a developer implement to satisfy the requirements?

Choose2 answer

Options:

A.

Flow

B.

Future method

C.

Trigger

D.

Invocable method

Question 42

In the following example, which starting context will mymethod execute it is invoked?

Options:

A.

Sharig rules will be inherited from the calling context.

B.

Sharig rules will be enforced for the running user.

C.

Sharig rules will be enforced by the instartiating class.

D.

Sharig rules will not be enforced for the running user.

Question 43

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?

Options:

A.

An Apex controller

B.

An Apex REST class

C.

An outbound message

D.

An invocable method

Question 44

When a user edits the Postal Code on an Account, a custom Account text field named ''Timezone'' must be updated based on the values another custom object object called.

What is the optimal way to Implement this feature?

Options:

A.

Build a flow with flow Builder.

B.

Build an account assignment rule.

C.

Create a formula field.

D.

Create an account approval process.

Question 45

Refer to the code snippet below:

When a Lightning web component is rendered, a list of apportunities that match certain criteria shopuld be retrievved from the database and displayed to the end user.

Which three Considerations must the developer implement to make the method available within the Lightning web component?

Choose 3 answer

Options:

A.

The method must specify the (cacheable-trun) attribute

B.

The method must specify the (continuation-true) attribute

C.

The method must be annotaled with true Invocablemethod annolation

D.

The method cannot mutate the result set retrieved from the database.

E.

The method must be annotated with the AureEnabled annolation

Question 46

What should be used to create scratch orgs?

Options:

A.

Developer Console

B.

Salesforce CLI

C.

Workbench

D.

Sandbox refresh

Question 47

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?

Options:

A.

@AuraEnabled(cacheable=true)

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

B.

@AuraEnabled(cacheable=true) public List search(String term) { /*implementation*/ }

C.

@AuraEnabled(cacheable=false) public static List search(String term) { /*implementation*/ }

D.

@AuraEnabled(cacheable=false) public List search(String term) { /*implementation*/ }

Question 48

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?

Options:

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.

Question 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 datadase.

Which two techniques should the developer implement as a best practice to ensure transaction control and avoid exceeding governor limits?

Choose 2 answers

Options:

A.

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

B.

Use the System,Limit classto monitor the current CPU governor limit consumption.

C.

Use the Database,Savepoint method to enforce database integrity.

D.

D. Use the Reedonly annotation to bypass the number of rows returned by a SOQL.

Question 50

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?

Options:

A.

Add a new Get Records element.

B.

Add a new Update Records element.

C.

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

D.

Add a new Create Records element.

Page: 1 / 17
Total 167 questions