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

PDI Salesforce Certified Platform Developer 1 (WI25) Questions and Answers

Questions 4

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

Choose 2 answers

Options:

A.

All custom objects must have visibility set to a value other than in Development.

B.

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

C.

All triggers must have some test coverage

D.

All Visual flows must have at least 1% test coverage.

Buy Now
Questions 5

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.

Visual Studio Code IDE

C.

AppExchange

D.

Developer Console

Buy Now
Questions 6

While developing an Apex class with custom search functionality that will be launched from a Lightning Web Component, how can the developer ensure only records accessible to the currently logged in user are displayed?

Options:

A.

Use the WITH SECURITY_ENFORCED clause within the SOQL.

B.

Use the inherited sharing keyword.

C.

Use the with sharing keyword.

D.

Use the without sharing keyword.

Buy Now
Questions 7

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.

Roll-up summary field

B.

Formula field

C.

Apex trigger

D.

Quick action

Buy Now
Questions 8

A developer writes a trigger on the Account object on the before update event that increments a count field. A record triggered flow also increments the count field every time that an Account is created or updated.

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.

4

B.

2

C.

1

D.

3

Buy Now
Questions 9

A developer must create a Lightning component that allows users to input Contact record information to create a Contact record, including a Salary c custom field.

What should the developer use, along with a lightning-record-edit-form, so that Salary__c field functions as a currency input and is only viewable and editable by users that have the correct field level permissions on Salary _c?

A)

PDI Question 9

B)

PDI Question 9

C)

PDI Question 9

D)

PDI Question 9

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Buy Now
Questions 10

Refer to the following Apex code:

PDI Question 10

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

Options:

A.

0

B.

1

C.

2

D.

4

Buy Now
Questions 11

A company's engineering department is conducting a month-long test on the scalability of an in-house-developed software that requires a cluster of 100 or more servers. Which of the following models is the best to use?

Options:

A.

PaaS

B.

SaaS

C.

BaaS

D.

laaS

Buy Now
Questions 12

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.. of the Controller according to the MVC architecture?

Choose 2 answers

Options:

A.

HTML file

B.

Apex class

C.

JavaScript file

D.

XML file

Buy Now
Questions 13

Universal Containers has a Visualforce page that displays a table of every Container__c being rented by a given Account. Recently this page is failing 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.

Implement pagination with an OffsetController.

B.

Implement pagination with a StandardSetController.

C.

Use JavaScript remoting with SOQL Offset.

D.

Use lazy loading and a transient List variable.

Buy Now
Questions 14

Which three data types can a SOQL query return?

Choose 3 answers

Options:

A.

Double

B.

O Long

C.

sObject

D.

dg Integer

E.

List

Buy Now
Questions 15

Which two characteristics are true for Lightning Web Component custom events?

Choose 2 answers

Options:

A.

Data may be passed in the payload of a custom event using @wire decorated properties.

B.

Data may be passed In the payload of a custom event using a property called detail.

C.

By default a custom event only propagates to its immediate container and to its immediate child component.

D.

By default a custom event only propagates to it’s immediate container.

Buy Now
Questions 16

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

What is the correct implementation?

A)

PDI Question 16

B)

PDI Question 16

C)

PDI Question 16

D)

PDI Question 16

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Buy Now
Questions 17

A developer has an integer variable called maxAttempts. The developer needs to ensure that once maxAttempts is initialized, it preserves its value for the length 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 constant using the static and final keywords.

B.

Declare maxattempts as a member variable on the trigger definition.

C.

Declare maxattempts as a variable on a helper class.

D.

Declare maxAttempts as a private static variable on a helper class.

Buy Now
Questions 18

What can be easily developed using the Lightning Component framework?

Options:

A.

Salesforce Classic user interface pages

B.

Lightning Pages

C.

Customized JavaScript buttons

D.

Salesforce integrations

Buy Now
Questions 19

The value of the account type field is not being displayed correctly on the page. Assuming the custom controller is properly referenced on the Visualforce page, what should the developer do to correct the problem?

Options:

A.

Add a getter method for the actType attribute.

B.

Change theAccount attribute to public.

C.

Add with sharing to the custom controller.

D.

Convert theAccount.Type to a String.

Buy Now
Questions 20

A developer is asked to write helper methods that create test data for unit tests.

PDI Question 20

What should be changed in the TestUtils class so that its methods are only usable by unit test methods?

Options:

A.

@isTest above line 03.

B.

Add @istest above line 01.

C.

Change public to private on line 01.

D.

Remove static from line 03.

Buy Now
Questions 21

Which statement generates a list of Leads and Contacts that have a field with the phrase 'ACME'?

A)

PDI Question 21

B)

PDI Question 21

C)

PDI Question 21

D)

PDI Question 21

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Buy Now
Questions 22

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)

PDI Question 22

B)

PDI Question 22

C)

PDI Question 22

D)

PDI Question 22

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Buy Now
Questions 23

What are two considerations for deploying from a sandbox to production?

Choose 2 answers

Options:

A.

At least 75% of Apex code must be covered by unit tests.

B.

Unit tests must have calls to the System.assert method.

C.

Should deploy during business hours to ensure feedback can be quickly addressed.

D.

All triggers must have at least one line of test coverage.

Buy Now
Questions 24

When using Salesforce DX, what does a developer need to enable to create and manage scratch orgs?

Options:

A.

Sandbox

B.

Environment Hub

C.

Production

D.

Dev Hub

Buy Now
Questions 25

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

One of the child components is used for navigation purposes. When a user clicks a button called Next in the child component, the parent component must be alerted so it can navigate to the next page.

How should this be accomplished?

Options:

A.

Update a property on the parent.

B.

Call a method in the Apex controller.

C.

Fire a notification.

D.

Create a custom event.

Buy Now
Questions 26

Which Lightning Web Component custom event property settings enable the event to bubble up the containment hierarchy and cross

the Shadow DOM boundary?

Options:

A.

bubbles: true, composed: false

B.

bubbles: false, composed: false

C.

bubbles: true, composed: true

D.

bubbles: false, composed: true

Buy Now
Questions 27

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

Choose 2 answers

Options:

A.

Tooling API

B.

Metadata API

C.

Bulk API

D.

Developer Console

Buy Now
Questions 28

A development team wants to use a deployment script to automatically deploy to a sandbox during their development cycles.

Which two tools can they use to run a script that deploys to a sandbox?

Choose 2 answers

Options:

A.

SFDX CLI

B.

Developer Console

C.

Change Sets

D.

Ant Migration Tool

Buy Now
Questions 29

A custom picklist field, Pool Preference ¢, exists on a custom object. The picklist contains the following options: ‘Vegan’, ‘Kosher’, 'No Preference’. The developer must ensure a value is populated every time a record is created or updated.

What is the optimal way to ensure a value is selected every time a record is saved?

Options:

A.

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

B.

Write an Apex trigger to ensure a value is selected,

C.

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

D.

Mark the field as Required on the field definition.

Buy Now
Questions 30

Universal Containers has a large number of custom applications that were built using a third-party JavaScript framework and exposed using Visualforce pages. The company wants to update these applications to apply styling that resembles the look and feel of Lightning Experience.

What should the developer do to fulfill the business request in the quickest and most effective manner?

Options:

A.

Rewrite all Visualforce pages as Lightning components.

B.

Set the attribute enableLightning to true in the definition.

C.

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

D.

Incorporate the Salesforce Lightning Design System CSS stylesheet Into the JavaScript applications.

Buy Now
Questions 31

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 Opportunity object and use tree sorting to sum the amount for all related child objects under the Opportunity.

B.

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

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 Metadata API to create real-time roll-up summaries.

Buy Now
Questions 32

Which scenario is valid for execution by unit tests?

Options:

A.

Execute anonymous Apex as a different user.

B.

Generate a Visualforce PDF with getcontentaAsPDF ().

C.

Load data from a remote site with a callout.

D.

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

Buy Now
Questions 33

Universal Containers wants to ensure that all new leads created in the system have a valid email address. They have already created a validation rule to enforce this requirement, but want to add an additional layer of validation using automation.

What would be the best solution for this requirement?

Options:

A.

Submit a REST API Callout with a JSON payload and validate the fields on a third party system

B.

Use a before-save Apex trigger on the Lead object to validate the email address and display an error message if it is invalid

C.

Use a custom Lightning Web component to make a callout to validate the fields on a third party system.

D.

Use an Approval Process to enforce the completion of a valid email address using an outbound message action.

Buy Now
Questions 34

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

Choose 2 answers

Options:

A.

Control

B.

default

C.

Buddle

D.

Emit

Buy Now
Questions 35

Which code statement includes an Apex method named updateAccounts in the class AccountController for use in a Lightning web component?

Options:

A.

import updateAccounts from "AccountControlles';

B.

import updateAccounts from "Salesforce/apex/AccountController:';

C.

import updateAccounts from "Account@ontroller.updateAccounts';

D.

import updateAccounts from "@salesforce/apex/AccountController.updateAccounts";

Buy Now
Questions 36

A developer needs to confirm that a Contact trigger works correctly without changing the organization's data.

What should the developer do to test the Contact trigger?

Options:

A.

Use Deploy from the VSCode IDE co deploy an 'insert Contact' Apex class.

B.

Use the New button on the Salesforce Contacts Tab to create a new Contact record.

C.

Use the Test menu on the Developer Console to run oil test classes for the Contact trigger.

D.

Use the Open Execute Anonymous feature on the Developer Console to run an "insert Contact' DML statement.

Buy Now
Questions 37

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

Options:

A.

Custom objects and fields

B.

Triggers

C.

Roll-up summaries

D.

Relationships

E.

Flows

Buy Now
Questions 38

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?

Options:

A.

@AuraEnabled(cacneable=true)

B.

@RemoteAction (cacheable-true)

C.

@RemoteAction

D.

@AuraEnabled

Buy Now
Questions 39

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

Choose 2 answers

Options:

A.

B.

$LightningcreateComponent

C.

$Lightning,use

D.

E.

#Lightning,useComponent

Buy Now
Questions 40

Flow Builder uses an Apex action to provide additional information about multiple Contacts, stored in a custom class, ContactInfo. Which is the correct definition of the Apex method that gets the additional information?

A)

PDI Question 40

B)

PDI Question 40

C)

PDI Question 40

D)

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Buy Now
Questions 41

What are three considerations when using the @lnvocableMethod annotation in Apex?

Choose 3 answers

Options:

A.

Only one method using the @invecableMethod annotation can be defined per Apex class_

B.

A method using the @invecableMethod annotation can have multiple input parameters.

C.

A method using the @invocablemethod annotation must be declaredas static,

D.

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

E.

A method using the @invocableMethod annotation can be declared as Public or Global.

Buy Now
Questions 42

A developer needs to make a custom Lightning Web Component available in the Salesforce Classic user interface Which approach can be used to accomplish this?

Options:

A.

Embed the Lightning Web Component is a Visualforce Component and add directly to the page layout.

B.

Use the Lightning Out JavaScript library to embed the Lightning Web Component in a Visualforce page and add to the page layout.

C.

Use a Visualforce page with a custom controller to invoke the Lightning Web Component using a call to an Apex method.

D.

Wrap the Lightning Web Component in an Aura Component and surface the Aura Component as a Visualforce tab.

Buy Now
Questions 43

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?

Options:

A.

lightning: flow

B.

lightning-low

C.

sure-flow

D.

aura: flow

Buy Now
Questions 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 in a PostalCodeToTimezone__c custom object.

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

Options:

A.

Quick actions

B.

Approval process

C.

Account trigger

D.

Fast Field Updates record-triggered flow

Buy Now
Questions 45

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

Options:

A.

View the code coverage percentage for the class using the Overall Code Coverage panel in the Developer Console Tests tab.

B.

View the Class Test Percentage tab on the Apex Class list view in Salesforce Setup.

C.

Select and run the class on the Apex Test Execution page in the Developer Console.

D.

View the Code Coverage column in the list view an the Apex Classes page.

Buy Now
Questions 46

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

Choose 2 answers

Options:

A.

Records created in the test setup method cannot be updated in individual test methods.

B.

In a test setup method, test data is inserted once and made available for all test methods In the test class.

C.

A method defined with the @testSetup annotation executes once for each test method in the test class and counts towards system limits.

D.

The @testSetup annotation is not supported when the @isTest(SeeAllData=True) annotation is used .

Buy Now
Questions 47

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

ist performSearch (String lastName} [

return Database.query('SELECT Id, FirstName, LastName FROM Contact WHERE LastName Like

s'+lastName+'s'")?;

What are two ways the developer can update the method to prevent a SOQL injection attack?

Choose 2 answers

Options:

A.

Use variable binding and replace the dynamic query with a static SOQL.

B.

Use the sacapeSingleQuotes method to sanitize the parameter before its use.

C.

Use the ¢Readonly annotation and the with sharing keyword on the class.

D.

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

Buy Now
Questions 48

A developer needs to create a baseline set of data (Accounts, Contacts, Products, Assets) for an entire suite of Apex tests allowing

them to test isolated requirements for various types of Salesforce cases.

Which approach can efficiently generate the required data for each unit test?

Options:

A.

Create a mock using the HttpcalloutMock interface.

B.

Use @TestSetup with a void method.

C.

Add @IsTest (seeAllData=true) at the start of the unit test class.

D.

Create test data before Test .startTest() in the unit test.

Buy Now
Questions 49

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 automatically relates Opportunities to Accounts.

B.

Data Loader runs from the developer's browser.

C.

Data Import Wizard does not support Opportunities.

D.

Data Import Wizard can not import all 500 records,

Buy Now
Questions 50

For which three items can a trace flag be configured?

Choose 3 answers

Options:

A.

Apex Class

B.

Flow

C.

User

D.

Visualforce

E.

Apex Trigger

Buy Now
Questions 51

Universal Containers wants a list button to display a Visualforce page that allows users to edit multiple records.

Which Visualforce feature supports this requirement?

Options:

A.

Standard Controller with Custom List Controller extension

B.

Custom List Controller with recorasetvar page attribute

C.

Controller Extension and tag

D.

Standard controller and the recordsetvar page attribute

Buy Now
Questions 52

A developer created a child Lightning web component nested inside a parent Lightning web component. The parent component needs to pass a string value to the child component.

In which two ways can this be accomplished?

Choose 2 answers

Options:

A.

The parent component can invoke a public method in the child component.

B.

The parent component can use a public property to pass the data to the child component,

C.

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

D.

The parent component can use a custom event to pass the data to the child component.

Buy Now
Questions 53

A developer wants to mark each Account in a List as either Active or Inactive, based on the value in the LastModified each Account being greater than 90 days in the past.

Which Apex technique should the developer use?

Options:

A.

An if-else statement, with a for loop inside

B.

A witch statement, with a for loop inside

C.

A for loop, with an if or if/else statement inside

D.

A for loop, with a switch statement inside

Buy Now
Questions 54

What are two characteristics related to formulas?

Choose 2 answers

Options:

A.

Formulas are calculated at runtime and are not stored in the database.

B.

Formulas can reference themselves.

C.

Formulas can reference values in related objects.

D.

Fields that are used in a formula field can be deleted or edited without editing the formula.

Buy Now
Questions 55

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 56

A developer wants to send an outbound message when a record meets a specific criteria.

Which two features satisfy this use case?

Options:

A.

Flow Builder can be used to check the record criteria and send an outbound message.

B.

Approval Process can be used to check the record criteria and send an outbound message without Apex code.

C.

Entitlement Process can be used to check the record criteria and send an outbound message without Apex code.

D.

Next Best Action can be used to check the record criteria and send an outbound message.

Buy Now
Questions 57

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 SOQL to query the org for the required data.

B.

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

C.

Use Anonymous Apex to create the required data.

D.

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

Buy Now
Questions 58

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

Choose 3 answers

Options:

A.

One-time loading for duplicate scripts

B.

Loading scripts in parallel

C.

Loading Files from Documents

D.

Specifying loading order

E.

Loading externally hosted scripts

Buy Now
Questions 59

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 secondary relationship

B.

Read/Write access on the primary relationship

C.

Read/Write access on the junction object

D.

Read access on the primary relationship

Buy Now
Questions 60

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

PDI Question 60

Which is the correct implementation?

PDI Question 60

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Buy Now
Exam Code: PDI
Exam Name: Salesforce Certified Platform Developer 1 (WI25)
Last Update: Jan 13, 2025
Questions: 200

PDF + Testing Engine

$66  $164.99

Testing Engine

$50  $124.99
buy now PDI testing engine

PDF (Q&A)

$42  $104.99
buy now PDI pdf