Winter Special Sale - Limited Time 60% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: 575363r9

Welcome To DumpsPedia

PDI Sample Questions Answers

Questions 4

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

Choose 3 answers

Options:

A.

Setup Menu

B.

Tooling API

C.

Metadata API

D.

Salesforce DX

E.

Bulk APL

Buy Now
Questions 5

A developer has a Visualforce page and custom controller to save Account records. The developer wants to display any validation rule violations to the user.

How can the developer make sure that validation rule violations are displayed?

Options:

A.

Include on the Visualforce page.

B.

Use a try/catch with a custom exception class.

C.

Add custom controller attributes to display the message.

D.

Perform the DML using the patabase.upsert () method.

Buy Now
Questions 6

Which three statements are accurate about debug logs?

Choose 3 answers

Options:

A.

A System debug logs are retained for 24 hours.

B.

Only the 20 most recent debug logs for a user are kept.

C.

Debug log levels are cumulative, where FINE log level includes all events logged at the DEBUG, INFO, WARN, and ERROR levels.

D.

Debug logs can be set for specific users, classes, and triggers.

E.

The maximum size of 3 debug log is 5 MB.

Buy Now
Questions 7

Which annotation should a developer use on an Apex method to make it available to be wired to a property in a Lightning web component?

A)

B)

C)

D)

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Buy Now
Questions 8

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

What is the correct definition of the Apex method?

A)

B)

C)

D)

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Buy Now
Questions 9

A developer created a Visualforce page and custom controller to display the account type field as shown below.

Custom controller code:

Visualforce page snippet:

what should the developer do to correct the problem?

Options:

A.

Add a getter method for the attribute.

B.

Convert theAccount.Type to a String.

C.

Change theAccount attribute to public.

D.

Add with sharing to the custom controller.

Buy Now
Questions 10

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.

An approval process on the Opportunity object

B.

A record trigger flow on the Opportunity object

C.

An Apex trigger on the Opportunity object

D.

An error condition formula on a validation rule on Opportunity

Buy Now
Questions 11

Refer to the following Apex code:

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

Options:

A.

0

B.

1

C.

2

D.

3

Buy Now
Questions 12

What are two use cases for executing Anonymous Apex code?

Choose 2 answers

Options:

A.

To run a batch Apex class to update all Contacts

B.

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

C.

To add unit test code coverage to an org

D.

To schedule an Apex class to run periodically

Buy Now
Questions 13

A developer created a new after insert trigger on the Lead object that creates Task records for each Lead.

After deploying to production, an existing outside integration that inserts Lead records in batches to Salesforce is occasionally reporting total batch failures being caused by the Task insert statement. This causes the integration process in the outside system to stop, requiring a manual restart.

Which change should the developer make to allow the integration to continue when some records in a batch cause failure due to the Task insert statement, so that manual restarts are not needed?

Options:

A.

Deactivate the trigger before the integration runs.

B.

Remove the Apex class from the integration user's profile,

C.

Use a try-catch block after the insert statement,

D.

Use the Database method with allOrNone set to false.

Buy Now
Questions 14

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

Choose 2 answers

Options:

A.

Bubble

B.

Control

C.

Default

D.

Emit

Buy Now
Questions 15

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

Options:

A.

The Parentld field on the standard Account object

B.

The Leadld and Contactld fields on the standard Campaign Member object

C.

The Whatld field on the standard Event object

D.

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

Buy Now
Questions 16

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

Choose 3 answers

Options:

A.

All external libraries

B.

SVG resources

C.

Third-party web components

D.

Content asset files

E.

Static resources

Buy Now
Questions 17

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 Import Wizard does not support Opportunities.

B.

Data Loader automatically relates Opportunities to Accounts.

C.

Data Loader runs from the developer's browser,

D.

Data Import Wizard can not import all 500 records.

Buy Now
Questions 18

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?

Options:

A.

B.

C.

D.

Buy Now
Questions 19

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?

Options:

A.

Create a junction object between OrderItem and Order.

B.

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

C.

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

D.

Add without sharing to the Apex class declaration.

Buy Now
Questions 20

Which exception type cannot be caught?

Options:

A.

NoAccessException

B.

LimitException

C.

CalloutException

D.

A custom exception

Buy Now
Questions 21

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

Options:

A.

Read/Write access on the primary relationship

B.

Read/Write access on the secondary relationship

C.

Read/Write access on the junction object

D.

Read access on the primary relationship

Buy Now
Questions 22

Which statement describes the execution order when triggers are associated to the same object and event?

Options:

A.

Triggers are executed in the order they are modified.

B.

Triggers are executed alphabetically by trigger name.

C.

Triggers are executed in the order they are created.

D.

Trigger execution order cannot be guaranteed.

Buy Now
Questions 23

A developer creates a Lightning web component that imports a method within an Apex class. When a Validate button is pressed, the method runs to execute complex validations.

In this implementation scenario, which two options are part of the Controller according to the MVC architecture?

Choose 2 answers

Options:

A.

HTML file

B.

XML file

C.

Apex class

D.

JavaScript file

Buy Now
Questions 24

What are two benefits of using declarative customizations over code? Choose 2 answers

Choose 2 answers

Options:

A.

Declarative customization* automatically generate test classes.

B.

Declarative customizations cannot generate run time errors.

C.

Declarative customizations automatically update with each Salesforce release.

D.

Declarative customizations generally require less maintenance.

Buy Now
Questions 25

What Is the result of the following code snippet?

Options:

A.

Accounts are inserted.

B.

Account is inserted.

C.

200 Accounts are inserted,

D.

201 Accounts are inserted.

Buy Now
Questions 26

Universal Containers wants Opportunities to no longer be editable when it reaches the Closed/Won stage.

Which two strategies can a developer use to accomplish this?

Options:

A.

Use a validation rule.

B.

Use a before-save Apex trigger.

C.

Use an automatically launched Approval Process.

D.

Use an auto-response rule.

Buy Now
Questions 27

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

A)

B)

C)

D)

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Buy Now
Questions 28

Which three data types can a SOQL query return?

Choose 3 answers

Options:

A.

sObject

B.

Double

C.

Long

D.

List

E.

Integer

Buy Now
Questions 29

A developer wrote Apex code that calls out to an external system using REST API.

How should a developer write the test to prove the code is working as intended?

Options:

A.

Write a class that implements WebServiceMock.

B.

Write a class that extends HTTPCalloutMock.

C.

Write a class that extends WerServiceMack.

D.

write a class that implements HTTPCalloutMock.

Buy Now
Questions 30

The following Apex method is part of the Contactservice class that is called from a trigger:

How should the developer modify the code to ensure best practices are met?

A)

B)

C)

D)

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Buy Now
Questions 31

What should a developer use to fix a Lightning web component bug in a sandbox?

Options:

A.

Execute Anonymous

B.

Developer Console

C.

Force.com IDE

D.

VS Code

Buy Now
Questions 32

Universal Containers hires a developer to build a custom search page to help users find the Accounts they want. Users will be able to search on Name, Description,

and a custom comments field.

Which consideration should the developer be aware of when deciding between SOQL and SOSL?

Choose 2 answers

Options:

A.

SOSL is faster for text searches.

B.

SOQL is faster for text searches.

C.

SOSL is able to return more records.

D.

SOQL is able to return more records.

Buy Now
Questions 33

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?

Options:

A.

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

B.

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

C.

Use Anonymous Apex to create the required data.

D.

Use SOQL to query the org for the required data.

Buy Now
Questions 34

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

Options:

A.

Visualforce

B.

Apex Trigger

C.

Apex Class

D.

Flow

E.

User

Buy Now
Questions 35

A developer deployed a trigger to update the status__c of Assets related to an Account when the Account’s status changes and a nightly integration that updates Accounts in bulk has started to fail with limit failures.

What should the developer change about the code to address the failure while still having the code update all of the Assets correctly?

Options:

A.

Add List assets = [SELECT Id, Status_c FROM Asset WHERE AccountId = :acctId) to line 14 and iterate over the assets list in the for loop on line 15.

B.

Move all of the logic to a gueueabs class that queries for and updates the Assets and call it from the trigger.

C.

Add a LIMIT clause to the SOQL query on line 16 to limit the number of Assets queried for an Account.

D.

Change the getAssecsTspdace method to process all Accounts in one call and call it outside of the £ox loop that starts on line 03.

Buy Now
Questions 36

A developer is creating a Lightning web component to show a list of sales records.

The Sales Representative user should be able to see the commission field on each record. The Sales Assistant user should be able to see all fields on the record except the commission field.

How should this be enforced so that the component works for both users without showing any errors?

Options:

A.

Use with 8ECTOITYJ2WFORCED in the SOQL that fetches the data for the component.

B.

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

C.

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

D.

Use security.stripinaccessible to remove fields inaccessible to the current user.

Buy Now
Questions 37

A developer is creating a page that allows users to create multiple Opportunities. The developer is asked to verify the current user's default Opportunity record type, and set certain default values based on the record type before inserting the record.

How can the developer find the current user's default record type?

Options:

A.

Use Opportunity.SObjectType.gethescribe () .getRaecordlypaInsos () to get a list of record types, and iterate through them until 2sDefaultRecordTypeMapping () is true.

B.

Query the Profile where the ID equals uzexInfo.getProfilelD () and then use the profile.Cpportunity.gesDefaultRecordTyp= () method.

C.

Use the Schema.userInfo.Cpportunity.getlefaultRecordIype () method.

D.

Create the opportunity and check the opportunity. recordTyp=, which will have the record ID of the current user's default record type, before inserting.

Buy Now
Questions 38

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.

Full Copy sandboxes

B.

Developer orgs

C.

Developer sandboxes

D.

Scratch orgs

Buy Now
Questions 39

A developer is tasked with building a custom Lightning web component to collect Contact information.

The form will be shared among many different types of users in the org. There are security requirements that only certain fields should be edited and viewed by certain groups of users.

What should the developer use in their Lightning Web Component to support the security requirements?

Options:

A.

force-input-field

B.

lightning-input-field

C.

ui-input-field

D.

aura-input-field

Buy Now
Questions 40

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.

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

B.

Write a trigger on the child object and use an agaregate function to sum the amount for all related child objects under the Opportunity.

C.

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

D.

Write a trigger on the Opportunity object and use tree sorting to sum the amount for all related child objects under the Opportunity.

Buy Now
Questions 41

Universal Containers has an order system that uses an Order Number to identify an order for customers and service agents. Order records will be imported into Salesforce.

How should the Order Number field be defined in Salesforce?

Options:

A.

Direct Lookup

B.

Lookup

C.

External ID and Unique

D.

Indirect Lookup

Buy Now
Questions 42

A developer is alerted to an Issue with a custom Apex trigger that is causing records to be duplicated.

What is the most appropriate debugging approach to troubleshoot the issue?

Options:

A.

Add system.debug statements to the code to track the execution flow and identify the issue.

B.

Use the Apex Interactive Debugger to step through the code and identify the issue.

C.

Disable the trigger in production and test to see if the issue still occurs.

D.

Review the Historical Event legs to identify the source of the issue.

Buy Now
Questions 43

Universal Containers (UC) processes orders in Salesforce in a custom object, ord=xr <. They also allow sales reps to upload CSV files with thousands 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 order__ c is first set to 'Placed’, the order information must be sent to a REST endpoint in the ERP system that can process one order at a time.

What should the developer implement to accomplish this?

Options:

A.

Callout from an Qfuture method called from a trigger

B.

Callout from a Batchable class called from a scheduled job

C.

Flow with a callout from an invocable method

D.

Callout from a Queueable class called from a trigger

Buy Now
Questions 44

In the following example, which sharing context will myMethod execute when it is invoked?

Options:

A.

Sharing rules will be inherited from the calling context.

B.

Sharing rules will not be enforced for the running user.

C.

Sharing rules will be enforced by the instantiating class.

D.

Sharing rules will be enforced for the running user.

Buy Now
Questions 45

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

What is the correct implementation?

A)

B)

C)

D)

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Buy Now
Questions 46

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

Which is the correct implementation?

A)

B)

Options:

A.

Option A

B.

Option B

Buy Now
Questions 47

Considering the following code snippet:

When the code executes, a DML exception is thrown.

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

Options:

A.

Implement Change Data Capture,

B.

Implement a try/catch block for the DML.

C.

Implement the upsert DML statement.

D.

Remove null items from the list of Accounts.

Buy Now
Questions 48

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 query performance?

Options:

A.

Setup Menu

B.

Developer Console

C.

Visual Studio Code IDE

D.

AppExchange

Buy Now
Questions 49

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?

Options:

A.

Quick action

B.

Apex trigger

C.

Roll-up summary field

D.

Formula field

Buy Now
Questions 50

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 this component available?

Choose 2 answers

A)

B)

C)

D)

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Buy Now
Questions 51

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)

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Buy Now
Questions 52

If Apex code executes inside the =x=cuz=() method of an Apex class when implementing the Batchable interface, which two statements are true regarding governor limits?

Choose 2 answers

Options:

A.

The Apex governor limits are reset for each iteration of the execute () method.

B.

The Apex governor limits cannot be exceeded due to the asynchronous nature of the transaction.

C.

The Apex governor limits will use the asynchronous limit levels.

D.

The Apex governor limits are omitted while calling the constructor of the Apex class.

Buy Now
Exam Code: PDI
Exam Name: Salesforce Certified Platform Developer I (SU24)
Last Update: Nov 30, 2024
Questions: 174
$66  $164.99
$50  $124.99
$42  $104.99
buy now PDI