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

Salesforce PDI Salesforce Certified Platform Developer 1 (WI25) Exam Practice Test

Page: 1 / 20
Total 200 questions

Salesforce Certified Platform Developer 1 (WI25) Questions and Answers

Question 1

What is the result of the following code snippet?

public word doWork(Account acct) {

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

insert acct;

}

Options:

A.

Accounts are inserted.

B.

Account is inserted.

C.

200 Accounts are inserted.

D.

201 Accounts are inserted.

Question 2

Universal Hiring uses Salesforce to capture job applications. A salesforce administrator created two custom objects; Job__c acting as the master object, to Application_c acting as the detail.

Within the Job__c object, a custom multi-select picklist, preferred _Locations__c, contains a list of approved states for the position. Each Job_Application__c record relates to a Contact within the system through a master-detail relationship.

Recruiters have requested the ability to view whether the Contact's Mailing State value matches a value selected on the Preferred Locations__c field, within the Job_Application__c record. Recruiters would like this value to be kept in sync if changes occur to the Contact's Mailing State.

What is the recommended tool a developer should use to meet the business requirement?

Options:

A.

Apex trigger

B.

Roll-up summary field

C.

Record-triggered flow

Question 3

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

Question 4

In terms of the MVC paradigm, what are two advantages of implementing the view layer of a Salesforce application using Lightning Web Component-based development over Visualforce?

Choose 2 answers

Options:

A.

Rich component ecosystem

B.

Leg capturing via the Debug Logs Setup page

C.

Built-in standard and custom set controllers

D.

Self-contained and reusable units of an application

Question 5

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?

Options:

A.

External Object

B.

External ID field

C.

Formula field

D.

Lookup field

Question 6

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.

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

B.

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

C.

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

D.

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

Question 7

A developer completed modifications 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 them to the production environment?

Choose 2 answers

Options:

A.

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

B.

All methods in the test classes must use @istest.

C.

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

D.

Test methods must be declared with the testMethod keyword.

Question 8

Which three steps allow a custom Scalable Vector Graphic (SVG) to be included in a Lightning web component?

Choose 3 answers

Options:

A.

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

B.

Upload the SVG as a static resource.

C.

Reference the import in the HTML template.

D.

Import the SVG as a content asset file.

E.

Reference the property in the HTML template.

Question 9

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.

Which relationship field should be implemented to support these requirements?

Options:

A.

Lookup field from Opportunity to Engineering _support__c

B.

Master-detail field from Engineering Support__c to Opportunity

C.

Master-detail field from Opportunity to Engineering Support__c

D.

Lookup field from Engineering Support __c to Opportunity

Question 10

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.

Add custom controller attributes to display the message.

B.

Use a try/catch with a custom exception class.

C.

Include on the Visualforce page.

D.

Perform the DML using the database.unsert() method,

Question 11

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

Options:

A.

@RemoteAction

B.

@RestResource (urlMapping='/myService/*"')

C.

@HttpInvocable

D.

@Aurabnabled(cacheable=true)

Question 12

Which two are best practices when it comes to Aura component and application event handling?

Choose 2 answers

Options:

A.

Try to use application events as opposed to component events.

B.

Reuse the event logic in a component bundle, by putting the logic in the helper.

C.

Use component events to communicate actions that should be handled at the application level.

D.

Handle low-level events in the event handler and re-fire them as higher-level events.

Question 13

Developers at Universal Containers (UC) use version control to share their code changes, but they notice that when they deploy their code to different environments they often have failures. They decide to set up Continuous Integration (CI).

What should the UC development team use to automatically run tests as part of their CI process?

Options:

A.

Salesforce CLI

B.

Visual Studio Code

C.

Force.com Toolkit

D.

Developer Console

Question 14

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?

Options:

A.

Declare the class and method using the global access modifier.

B.

Declare the class and method using the public access modifier.

C.

Declare the class as public and use the global access modifier on the method.

D.

Declare the class as global and use the public access modifier on the method.

Question 15

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 Apex trigger on the Opportunity object

B.

An error condition formula on a validation rule on Opportunity

C.

A record trigger flow on the Opportunity object

D.

An approval process on the Opportunity object

Question 16

A developer identifies the following triggers on the Expense _c object:

Question # 16

The triggers process before delete, before insert, and before update events respectively.

Which two techniques should the developer implement to ensure trigger best practices are followed?

Choose 2 answers

Options:

A.

Unity all three triggers In a single trigger on the Expense__c object that Includes all events.

B.

Unify the before insert and before update triggers and use Flow for the delete action.

C.

Create helper classes to execute the appropriate logic when a record is saved.

D.

Maintain all three triggers on the Expense __c object, but move the Apex logic out of the trigger definition.

Question 17

Managers at Universal Containers want to ensure that only decommissioned containers are able to be deleted in the system. To meet the business requirement a Salesforce developer adds "Decommissioned" as a picklist value for the Status _c custom field within the Container _c object.

Which two approaches could a developer use to enforce only Container records with a status of "Decommissioned" can be deleted?

Choose 2 answers

Options:

A.

Before record-triggered flaw

B.

Apex trigger

C.

After record-triggered flow

D.

Validation rule

Question 18

What are two benefits of using declarative customizations over code?

Choose 2 answer

Options:

A.

Declarative customizations automatically update with each Salesforce release.

B.

Declarative customizations automatically generate test classes.

C.

Declarative customizations cannot generate run time errors

D.

Declarative customizations generally require less maintenance

Question 19

What should be used to create scratch orgs?

Options:

A.

Salesforce CLI

B.

Sandbox refresh

C.

Developer Console

D.

Workbench

Question 20

Universal Containers (UC) uses a custom object called Vendor. The Vendor custom object has a master-detail relationship with the standard Account object.

Based on some internal discussions, the UC administrator tried to change the master-detail relationship to a lookup relationship, but was not able to do so.

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

Options:

A.

Some of the Vendor records have null for the Account field.

B.

The Account object has a roll up summary field on the Vendor object.

C.

The Account object does not allow changing a field type for a custom field.

D.

The organization wide default for the Vendor object is Public Read/Write.

Question 21

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.

Trigger execution order cannot be guaranteed.

C.

Triggers are executed alphabetically by trigger name.

D.

Triggers are executed in the order they are created.

Question 22

A lead developer creates a virtual class called "OrderRequest". Consider the following code snippet:

Question # 22

How can a developer use the OrderRequest class within the CustomerOrder class?

Options:

A.

Extends (class="OrderRequest"}

public class CustomerOrder

B.

public class CustomerOrder implements Order

C.

public class CustomerOrder extends OrderRequest

D.

@Implements (class="OrderRequest")

public class Customerorder

Question 23

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

Question 24

A developer creates a custom exception as shown below:

public class ParityException extends Exception { }

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

Options:

A.

throw new ParityException ();

B.

throw new parityException ('parity does not match');

C.

new ParityException ();

D.

new ParityException('parity does not match');

Question 25

Universal 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 step of collecting information, UC's ERP system must be checked via a REST endpoint to see if the customer exists. 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?

Choose 2 answers

Options:

A.

Flow

B.

Invocable method

C.

Future method

D.

Trigger

Question 26

What does the Lightning Component framework provide to developers?

Options:

A.

Support for Classic and Lightning UIs

B.

Prebuilt components that can be reused

C.

Templates to create custom components

D.

Extended governor limits for applications

Question 27

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

public class SilverLaptop{

//code implementation

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

A)

Question # 27

B)

Question # 27

C)

Question # 27

D)

Question # 27

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Question 28

How is a controller and extension specified for a custom object named "Notice" on a Visualforce page?

Options:

A.

apex:page standardController="Notice_c" extensions="myControllerExtension"”

B.

apex:page controllers="Notice_c, myContcollerExtension"

C.

apex:pege=Notice extends="myControllerExtension”

D.

apex:page controller="Notice_c" extensions="myControllerExtension"

Question 29

A credit card company needs to implement the functionality for a service agent to process damaged or stolen credit cards. When the customers call in, the service

agent must gather many pieces of information. A developer is tasked to implement this functionality.

What should the developer use to satisfy this requirement in the most efficient manner?

Options:

A.

Screen-based flow

B.

Approval process

C.

Apex trigger

D.

Lightning Component

Question 30

Which two operations affect the number of times a trigger can fire?

Choose 2 answers

Options:

A.

Criteria-based sharing calculations

B.

Email messages

C.

Roll-up summary fields

D.

After-save record-triggered flow

Question 31

A developer must implement a CheckPaymentProcessor class that provides check processing payment capabilities that adhere to what is defined for payments in the Payment Processor interface.

Question # 31

Which implementation is correct to use the PaymentProcessor interface class?

A)

Question # 31

B)

Question # 31

C)

Question # 31

D)

Question # 31

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Question 32

What is a considerations for running a flow in debug mode?

Options:

A.

When debugging a schedule-triggered flow, the flow starts only for one record.

B.

Clicking Pause allows an element to be replaced in the flow.

C.

DML operations will be rolled back when the debugging ends.

D.

Callouts to external are not when debugging a flow.

Question 33

A company has a custom object, order __c, that has a required, unique external ID field called order Number__c.

Which statement should be used to perform the DML necessary to insert new records and update existing records in a list of Order __c records

using the external ID field?

Options:

A.

merge orders;

B.

merge orders Order Number_c;

C.

upsert orders Order Number c;

D.

upsert orders;

Question 34

A business has a proprietary Order Management System (OMS) that creates orders from its 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.

The business notices that each update from the OMS creates a new order record in Salesforce.

Which two actions should prevent the duplicate order records from being created in Salesforce?

Choose 2 answers

Options:

A.

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

B.

Ensure that the order number in the OMS is unique.

C.

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

D.

O Write a trigger on the Order object to delete the duplicates.

Question 35

Which code in a Visualforce page and/or controller might present a security vulnerability?

Question # 35

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Question 36

What is the result of the following code?

Question # 36

Options:

A.

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

B.

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

C.

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

D.

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

Question 37

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

Question 38

What is the value of the Trigger.old context variable in a before insert trigger?

Options:

A.

An empty list of sObjects

B.

Undefined

C.

null

D.

A list of newly created sObjects without IDs

Question 39

A developer has identified a method in an Apex class that performs resource intensive actions in memory by iterating over the result set of a SOQL statement on the account. The method also performs a DML statement to save the changes to the database.

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

Choose 2 answers

Options:

A.

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

B.

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

C.

Use the System.limit class to monitor the current CPU governor limit consumption.

D.

Use the Database.Savepoint method to enforce database integrity.

Question 40

Universal Containers decided to transition from Classic to Lightning Experience. They asked a developer to replace a JavaScript button that was being used to create records with prepopulated values.

What can the developer use to accomplish this?

Options:

A.

Validation rules

B.

Apex triggers

C.

Record triggered flows

D.

Quick Actions

Question 41

Which two actions may cause triggers to fire?

Choose 2 answers

Options:

A.

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

B.

Updates to FeedItem

C.

Cascading delete operations

D.

Renaming or replacing a picklist entry

Question 42

While writing an Apex class, a developer wants to make sure that all functionality being developed is handled as specified by the requirements.

Which approach should the developer use to be sure that the Apex class is working according to specifications?

Options:

A.

Include a savepoint and pacabase.rollback().

B.

Include a try/catch block to the Apex class.

C.

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

D.

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

Question 43

Universal Containers (UC) processes orders in Salesforce in a custom object, Order__c. 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 a Queueable class 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 an @future method called from a trigger

Question 44

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)

Question # 44

B)

Question # 44

C)

Question # 44

D)

Question # 44

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Question 45

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.

Question 46

Which statement should be used to allow some of the records in a list of records to be inserted if others fail to be inserted?

Options:

A.

Database. insert (records, true)

B.

insert records

C.

insert (records, false)

D.

Database. insert (records, false)

Question 47

A custom object Trainer__c has a lookup field to another custom object Gym__c.

Which SOQL query will get the record for the Viridian City Gym and all it's trainers?

Options:

A.

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

B.

SELECT Id, (SELECT Id FROM Trainer_c FROM Gym_c WHERE Name = ‘Viridian City Gym"

C.

SELECT Id, (SELECT Id FROM Trainers _r) FROM Gym_c WHERE Name = ‘Viridian City Gym'

D.

SELECT Id, (SELECT Id FROM Trainers _c) FROM Gym_c WHERE Name = 'Viridian City Gym'

Question 48

A Primaryld_c custom field exists on the Candidate _c¢ custom object. The field is used to store each candidate's id number and is marked as Unique in the schema definition.

As part of a data enrichment process, Universal Containers has a CSV file that contains updated data for all candidates in the system. The file contains each Candidate's primary .. 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?

Options:

A.

Upload the CSV into-a custom object related to candidate__c.

B.

Create a before insert trigger to correctly map the records,

C.

Update the Primarytd_c field definition to mark it. as.an External Id.

D.

Create a before save flow to correctly map the records.

Question 49

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

Question 50

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.

Question 51

Universal Containers recently transitioned from Classic to Lightning Experience.

One of its business processes requires certain values from the Opportunity object to be sent via an HTTP REST callout to its external order management system when the user presses a custom button on the Opportunity detail page. Example values are as follows:

* Name

*Amount

* Account

Which two methods should the developer implement to fulfill the business requirement?

Choose 2 answers

Options:

A.

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

B.

Create a Remote Action on the Opportunity object that executes an Apex immediate action to perform the HTTP REST callout whenever the Opportunity is updated.

C.

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

D.

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

Question 52

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.

Question 53

The Job _Application__c custom object has a field that is a master-detail relationship to the Contact object, where the Contact object is the master.

As part of a feature implementation, a developer needs to retrieve a list containing all Contact records where the related Account Industry is

‘Technology’, while also retrieving the Contact's Job_Application__c records.

Based on the object's relationships, what is the most efficient statement to retrieve the list of Contacts?

A)

Question # 53

B)

Question # 53

C)

Question # 53

D)

Question # 53

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Question 54

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

Options:

A.

Use the SeeAllData annotation.

B.

Add a test method in the Apex class.

C.

Mark the Apex class as global.

D.

Use the @TestVisible annotation.

Question 55

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

Question # 55

Options:

A.

Sharing rules will be enforced by the instantiating class.

B.

Sharing rules will be enforced for the running user.

C.

Sharing rules will not be enforced for the running user.

D.

Sharing rules will be inherited from the calling context.

Page: 1 / 20
Total 200 questions