New Year Special Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: 70percent

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

Demo: 60 questions
Total 200 questions

Salesforce Certified Platform Developer 1 (WI25) Questions and Answers

Question 1

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 2

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

Question 3

The values 'High', 'Medium', and 'Low' are identified as common values for multiple picklists across different objects.

What is an approach a developer can take to streamline maintenance of the picklists and their values, while also restricting the values to the ones mentioned above?

Options:

A.

Create the Picklist on each object and use a Global Picklist Value Set containing the values.

B.

Create the Picklist on each object as a required field and select "Display values alphabetically, not in the order entered".

C.

Create the Picklist on each object and add a validation rule to ensure data integrity.

D.

Create the Picklist on each object and select "Restrict picklist to the values defined in the value set".

Question 4

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.

Question 5

While working in a sandbox, an Apex test fails when run in the Test Runner. However, executing the Apex logic in the Execute Anonymous window succeeds with no exceptions or errors.

Why did the method fail in the sandbox test framework but succeed in the Developer Console?

Options:

A.

The test method does not use system. runAs to execute as a specific user.

B.

The test method is calling an @future method.

C.

The test method relies on existing data in the sandbox.

D.

The test method has a syntax error in the code.

Question 6

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

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.

Question 7

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 8

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

Options:

A.

Renaming or replacing picklists

B.

updating addresses using Mass Address updated tool

C.

Importing data using the Data Loader and the Bulk API

D.

Converting Leads to Contacts

Question 9

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

Options:

A.

By providing device-awareness for mobile and desktops

B.

By providing an Agile process with default steps

C.

By providing change history and version control

D.

By providing code review standards and processes

Question 10

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 11

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 failures due to the Task

insert statement, so that manual restarts are not needed?

Options:

A.

Use the Database method with allow one set to false.

B.

Deactivate the trigger before the integration runs.

C.

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

D.

Use a try-catch block after the insert statement.

Question 12

A developer created a custom order management app that uses an Apex class. The order is represented by an Order object and an

OrderlItem 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 OrderItem records to a new Order record?

Options:

A.

Add without sharing to the Apex class declaration.

B.

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

C.

Create a junction object between OrderItem and Order.

D.

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

Question 13

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

Question 14

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.

OrgLimits

B.

Limits

C.

Messaging

D.

Exception

Question 15

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 .

Question 16

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 17

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

Options:

A.

fire()

B.

SegdetesEvent (}

C.

FireEvent()

D.

emit()

Question 18

A developer created a trigger on a custom object. This custom object also has some dependent pick lists.

According to the order of execution rules, which step happens first?

Options:

A.

The original record is loaded from the database.

B.

System validation is run for maximum field lengths.

C.

Old values are overwritten with the new record values.

D.

JavaScript validation is run in the browser,

Question 19

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 20

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

Choose 3 answers

Options:

A.

Static resources

B.

All external libraries

C.

SVG resources

D.

Third-party web components

E.

Content asset files

Question 21

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 22

Consider the following code snippet:

As part of the deployment cycle, a developer creates the following test class:

When the test class runs, the assertion fails.

Which change should the developer implement in the Apex test method to ensure the test method executes successfully?

Options:

A.

Query the Administrator use into memory and enclose lines 15 and 16 within the system,runAs (use); method.

B.

Query the Standard User into memory and enclose lines 15 and 16 within the system ,runAs; method.

C.

Add @Istest% seeAllDataTrue; to line 12 and enclose lines 15 and 16 within Test .set(Test); and test ste-ptest();.

D.

Add System, runAs (Use; to line 14 and enclose line 15 within Test, startTest); and Test ().

Question 23

If Apex code executes inside the execute() 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 asynchronaus 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.

Question 24

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 25

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 26

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.

Question 27

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

Options:

A.

Developer Console

B.

Force.com IDE

C.

Execute Anonymous

D.

VS Code

Question 28

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 29

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

Question 30

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.

Question 31

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 32

As part of new feature development, a developer is asked to build a responsive application capable of responding to touch events, that will be executed on stateful clients.

Which two technologies are built on a framework that fully supports the business requirement? Choose 2 answers

Options:

A.

Lightning Web Components

B.

Visualforce Components

C.

Visualforce Pages

D.

Aura Components

Question 33

A developer is designing a new application on the Salesforce platform and wants to ensure it can support multiple tenants effectively.

Which design framework should the developer consider to ensure scalability and maintainability?

Options:

A.

Waterfall Model

B.

Flux (view, action, dispatcher, and store)

C.

Model-View-Controller (MVC)

D.

Agile Development

Question 34

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

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Question 35

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 36

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.

Question 37

A developer at AW Computing is tasked to create the supporting test class for a programmatic customization that leverages records stored within the custom object, Pricing Structure c. AW Computing has a complex pricing structure for each item on the store, spanning more than 500 records.

Which two approaches can the developer use to ensure Pricing _Structure__c records are available when the test class is executed?

Choose 2 answers

Options:

A.

Use a Test Date Factory class.

B.

Use the @TsTest (SeeAllData=true) annotation.

C.

Use the Test. leadteat{) method.

D.

Use without sharing on the class declaration.

Question 38

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 able to return more records

C.

SOQL Is faster for text searches.

D.

SOSL is able to return more records.

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

aura-input-failed

B.

force-input-failed

C.

ui-input-failed

D.

lightning-input-failed

Question 40

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

Question 41

What is a benefit of developing applications

Options:

A.

Enforced unit testing and code coverage best practices

B.

Access to predefined computing resources

C.

Preconfigured storage for big data

D.

Unlimited processing power and memory

Question 42

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.

Question 43

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 44

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 45

What should be used to create scratch orgs?

Options:

A.

Salesforce CLI

B.

Sandbox refresh

C.

Developer Console

D.

Workbench

Question 46

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

Question 47

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

Question 48

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,

Question 49

Provide question feedback here (optional):

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

Options:

A.

4

B.

1

C.

2

D.

3

Question 50

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.

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

B.

Query the Profile where the ID equals userinfo.getprofileID () and then use the profile opportunity. getdefaultresoratype (} method,

C.

Use the schema. Userinfo. Opportunity. getDefaultRecordType {) method.

D.

Use opportunity. sobjectTyps. getDeacribse().getRecordTypeInfos {) to get a list of record types, and iterate through them until isDefaultRecordtypeMapping {) is true.

Question 51

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.

Which implementation is correct to use the PaymentProcessor interface class?

A)

B)

C)

D)

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Question 52

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 53

A software company is using Salesforce to track the companies they sell their software to in the Account object. They also use Salesforce to track bugs in their software with a custom object, Bug__c.

As part of a process improvement initiative, they want to be able to report on which companies have reported which bugs. Each company should be able to report multiple bugs and bugs can also be reported by multiple companies.

What is needed to allow this reporting?

Options:

A.

Roll-up summary field of Bug_c on Account

B.

Master-detail field on Bug_c to Account

C.

Lookup field on Bug_c to Account

D.

Function object between Bug__c and Account

Question 54

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.

4

Question 55

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

Options:

A.

FIND ‘Universal Conteiners' IN CompenyName Fields RETURNING leadjid, name), sccount(ad, name}, conteact(id, name)

B.

SELECT Lead.id, Lead.Neme, Account,Id, Account.Neme, Contact.id, Contact.Neame FROM Lead, Account, Contact WHERE CompanyName = "Universal Containers*

C.

PIND ‘Universal Centainers’ IN Name Fields RETURNING lead(id, name), saceount(id, mame), contact (id, name)

D.

SELECT lead(id, name), account (id, name}, contact(id, name) FROM Lead, Account, Contact WHERE Name = "Universal Containers’

Question 56

The Account object in an organization has a master-detail relationship to a child object called Branch. The following automations exist:

* Roll-up summary fields

* Custom validation rules

* Duplicate rules

developer created a trigger on the Account object.

Which two things should the developer consider while testing the trigger code?

Choose 2 answers

Options:

A.

Rollup summary fields can cause the parent record to go through Save.

B.

Duplicate rules are executed once all DML operations commit to the database.

C.

The trigger may fire multiple times during a transaction.

D.

The validation rules will cause the trigger to fire again.

Question 57

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 58

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

A)

B)

C)

D)

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Question 59

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.

Question 60

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

Options:

A.

Add lightning_Recordpage to the statuscomponent. js file,

B.

Add lightning RecordPage to the statusComp .js-meta.xml file.

C.

Set is Exposes to true In the statuscomponent.js-meta.xml file.

D.

Add Account to the statusComponent. js-meta.xm1 file.

Demo: 60 questions
Total 200 questions