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

Easiest Solution 2 Pass Your Certification Exams

PDII Salesforce Certified Platform Developer II (Plat-Dev-301) Free Practice Exam Questions (2025 Updated)

Prepare effectively for your Salesforce PDII Salesforce Certified Platform Developer II (Plat-Dev-301) certification with our extensive collection of free, high-quality practice questions. Each question is designed to mirror the actual exam format and objectives, complete with comprehensive answers and detailed explanations. Our materials are regularly updated for 2025, ensuring you have the most current resources to build confidence and succeed on your first attempt.

Page: 3 / 3
Total 202 questions

A developer is creating a Lightning web component that displays a list of records in a lightning-datatable. After saving a new record to the database, the list is not updating.

What should the developer change in the code above for this to

happen?

A.

Call rafrasnApex() ON this.dazta.

B.

Create a new variable to store the result and annotate it with @track.

C.

Create a variable to store the result and call refreshpex().

D.

Add the @track decorator to the data variable.

A developer needs to send Account records to an external system for backup purposes. The process must take a snapshot of Accounts as they are saved and then make a callout to a RESTful web service. The web service can only receive, at most, one record per call.

What should a developer do to implement these requirements?

A.

Implement the Queveable interface.

B.

Implement platform events.

C.

Expose an Apex class as e web service.

D.

Create a future method.

Universal Containers allows customers to log into a Salesforce Community and update their orders via a custom Visualforce page. Universal Containers’ sales representatives can edit the orders on the same Visualforce page.

What should a developer use in an Apex test class to test that record sharing is enforced on the Visualforce page?

A.

use System. profiles=() to test as a sales rep and a community user.

B.

use System. profiles() to test as an administrator and a community user.

C.

use System. profiles1h=() to test as a sales rep and a community user.

D.

use System. runsAs () to test as an administrator and a community user.

An Apex trigger creates an order co record every time an Opportunity is won by a Sales Rep. Recently the trigger is creating two orders.

What is the optimal technique for 2 developer to troubleshoot this?

A.

Disable all flows, and then re-enable them one at at time to see which one causes the error.

B.

Run the Apex Test Classes for the Apex trigger to ensure the code still has sufficient code coverage.

C.

Set up debug logging for every Sales Rep, then monitor the logs for errors and exceptions,

D.

Add system.debug() statements to the code and use the Developer Console logs to trace the code.

An org has a requirement that an Account must always have one and only one Contact listed as Primary. So selecting one Contact will de-select any others. The client wants a checkbox on the Contact called 'Is Primary’ to control this feature.

The client also wants to ensure that the last name of every Contact is stored entirely in uppercase characters.

What is the optimal way to implement these requirements?

A.

Write a Validation Rule on the Contact for the Is Primary logic and a before update trigger on Contact for the last name logic.

B.

Write an after update trigger on Contact for the Is Primary logic and a separate before update trigger on Contact for the last name logic.

C.

Write a single trigger on Contact for both after update and before update and callout to helper classes to handle each set of logic.

D.

Write an after update trigger on Account for the Is Primary logic and a before update trigger on Contact for the last name logic.

Universal Containers wants to notify an external system, in the event that an unhandled exception occurs, by publishing a custom event using Apex.

What is the appropriate publish/subscribe logic to meet this requirement?

A.

Publish the error event using the Eventrus.publish() method and have the external system subscribe to the event using CometD.

B.

Publish the error event using the addError () method and write a trigger to subscribe to the event and notify the external system.

C.

Have the external system subscribe to the event channel. No publishing is necessary.

D.

Publish the error event using the addError () method and have the external system subscribe to the event using CometD.

A developer created an Opportunity trigger that updates the account rating when an associated opportunity is considered high value. Current criteria for an opportunity

to be considered high value is an amount greater than or equal to $1,000,000. However, this criteria value can change over time.

There is a new requirement to also display high value opportunities in a Lightning web component.

Which two actions should the developer take to meet these business requirements, and also prevent the business logic that obtains the high value opportunities from

being repeated in more than one place?

Choose 2 answers

A.

Call the trigger from the Lightning web component.

B.

Create a helper class that fetches the high value opportunities,

C.

Leave the business logic code inside the trigger for efficiency.

D.

Use custom metadata to hold the high value amount.

A developer needs to add code to a Lightning web component's configuration file so the component only renders for a desktop size form factor when on a record page.

What should the developer add to the component's record page target configuration to meet this requirement?

A)

B)

C)

D)

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Which technique can run custom logic when a Lightning web component is loaded?

A.

Use an init event to call a function.

B.

Use the randersd loack { } method.

C.

Call 52. engqueusiction and pass in the method to call.

D.

Use the connectedCallback { } method.

Given the following containment hierarchy:

What is the correct way to communicate the new value of a property named ‘’passthrough’’ to my-parent-component if the property is defined within my-child-component?

A)

B)

C)

D)

A.

Option A

B.

Option B

C.

Option C

D.

Option D

A developer is tasked with creating a Lightning web component that is responsive on various devices,

Which two components should help accomplish this goal?

Choose 2 answers

A.

lightning-navigation

B.

Lightning-input-location

C.

Lightning-layout

D.

lightning-layout—-item

What are three reasons that a developer should write Jest tests for Lightning web components?

Choose 3 answers

A.

To test a component's non-public properties.

B.

To test basic user interaction

C.

To verify the DOM output of a component

D.

To test how multiple components work together

E.

To verify that events fire when expected

An Apex class does not achieve expected code coverage. The testsetup method explicitly calls a method In the Apex class..

How can the developer generate the code coverage?

A.

Use system.assert() in testSetup to verify the values are being returned.

B.

Verify the user has permissions passing a user into System,.runds().

C.

Call the Apex class method from a testsetup Instead of the testsetup methed.

D.

Add @testvisible to the method in the class the developer is testing.

A developer has a Visualforce page that automatically assigns ewnership of an Account to a queue upon save. The page appears to correctly assign ownership, but an assertion validating the correct ownership fails.

What can cause this problem?

A.

The test class does not retrieve the updated value from the database,

B.

The test class does not use the Bulk API for loading test data.

C.

The test class does not use the seeallData=true= annotation.

D.

The test class does not implement the Queueable interface.

An Apex trigger and Apex class increment a counter, Edit __C, any time the Case is changed.

A)

B)

C)

D)

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Consider the following code snippet:

The Apex method is executed in an environment with a large data volume count for Accounts, and the query is performing poorly.

Which technique should the developer implement to ensure the query performs optimally, while preserving the entire result set?

A.

Create a formula field to combine the createdDate and RecordType value, then filter based on the formula.

B.

Break down the query into two individual queries and join the two result sets.

C.

Annotate the method with the @Future annotation

D.

Use the Database queryLocator method to retrieve the accounts.

A company wants to incorporate a third-party weh service to set the Address fields

when an Account is inserted, if they have not already been set.

What is the optimal way to achieve this?

A.

Create a Workflow Rule, execute a Queueable job from it, and make a callout from the Queueable job.

B.

Create an Apex trigger, execute a Queueable job from it, and make a callout from the Queueable job.

C.

Create a Process, execute a Quaueable job from it, and make a callout from the Queueable job.

D.

Create a Before Save Flow, execute a Queueable job from it, and make a callout from the Queusable job.

Which statement is true regarding savepoints?

A.

You can roll back to any savepoint variable created in any order.

B.

Static variables are not reverted during a rollback.

C.

Reference to savepoints can cross trigger invocations.

D.

Savepoints are not limited by DML statement governor limits.

A developer is debugging an Apex-based order creation process that has a requirement to have three savepoints, SP1, SP2, and 5P3 {created in order), before the final execution of the process.

During the final execution process, the developer has a routine to roll back to SP1 for a given condition. Once the condition is fixed, the code then calls 2 roll back to SP3 to continue with final execution. However, when the roll back to SP3 is called, a Funtime error occurs.

Why does the developer receive a runtime error?

A.

SP3 became invalid when SP1 was rolled back.

B.

The developer has too many DML statements between the savepoints.

C.

The developer used too many savepoints in one trigger session.

D.

The developer should have called SF2 before calling SP3.

Users report that a button on a custom Lightning web component (LWC) is not

saving the data they enter. The button looks to be clicked, but the LWC simply sits

there, seemingly doing nothing.

What should the developer use to ensure error messages are properly displayed?

A.

Add a try-catch block surrounding the DML statement.

B.

Use the Database method with a110rNone Set to false.

C.

Add the tag to the component.

D.

Add JavaScript and HTML to display an error message.

Page: 3 / 3
Total 202 questions
Copyright © 2014-2025 Solution2Pass. All Rights Reserved