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: 2 / 3
Total 202 questions

A developer sees test failures in the sandbox but not in production. No code or metadata changes have been actively made to either environment since the sandbox was created.

Which consideration should be checked to resolve the issue?

A.

Ensure that Disable Parallel Apex Testing Is unchecked.

B.

Ensure test classes are using SeeAllData = true.

C.

Ensure the sandbox Is on the same release as production.

D.

Ensure the Apex classes are on the same API version.

How should a developer verify that a specific Account record is being tested in a test

class for a Visualforce controller?

A.

Insert the Account in the test class, instantiate the page reference in the test class, then use System.currentFageReference() .getFarameters() .put{) to set the Account ID.

B.

Insert the Account into Salesforce, instantiate the page reference in the test class, then use system. setFarentRecordId() .get() to set the Account ID.

{of Instantiate the page reference in the test class, insert the Account in

the test class, then use =seeAllData=trus to view the Account.

C.

Instantiate the page reference in the test class, insert the Account in

the test class, then use system.setFarentRecordrd() .get() to set the Account ID,

A developer is building a Lightning web component that searches

for Contacts. The component must communicate the search

results to other unrelated Lightning web components, that are in

different DOM trees, when the search completes.

What should the developer do to implement the communication?

A.

Fire an application event.

B.

Publish an event on an event channel.

C.

Fire a custom component event.

D.

Publish a message on a message channel.

Just prior to a new deployment the Salesforce administrator, who configured a new order fulfillment process feature in a developer sandbox, suddenly left the company.

Ag part of the UAT cycle, the users had fully tested all of the changes in the sandbox and signed off on them; making the Order fulfillment feature ready for its go-live in the production environment.

Unfortunately, although a Change Set was started, it was not completed by the former administrator.

A developer is brought in to finish the deployment.

What should the developer do to identify the configuration changes that need to be moved into production?

A.

In Salesforce setup, look at the last modified date for every object to determine which should be added to the Change Set.

B.

Use the Metadata API and a supported development IDE to push all of the configuration from the sandbox into production to ensure no changes are lost.

C.

Leverage the Setup Audit Trail to review the changes made by the departed Administrator and identify which changes should be added to the Change Set.

D.

Set up Continuous Integration and a Git repository to automatically merge all changes from the sandbox metadata with the production metadata.

A developer created 2 class that implements the Queueable Interface, as follows:

As part of the deployment process, the developer is asked to create a corresponding test class.

Which two actions should the developer take to successfully execute the test class?

Choose 2 answers

A.

Implement seeAllData=True to ensure the Queueable job is able to run in bulk mode.

B.

Ensure the running user of the test class has, at I the View All permission on the Order object.

C.

Enclose System.enqueueJob(new OrderQueueableJob ()] within Tess. and Test .stopTest (1.

D.

Implement Test. isRunningTest() to prevent chaining jobs during test execution.

A developer writes a Lightning web component that displays a dropdown list of all custom objects in the org from which a user will select. An Apex method prepares and returns data to the component.

What should the developer do to determine which objects to include in the response?

A.

Check the isCustom() value on the sObject describe result.

B.

Import the list of all custom objects from @salesforce/schema.

C.

Check the getobiectType [) value for ‘Custom’ or "Standard’ on the sObject describe result.

D.

Use the getcustomobjects() method from the Schema class.

Universal Containers has an Apex trigger on Account that creates an Account Plan record when an Account is marked as a Customer.

Recently a record-triggered flow was added so that whenever an Account is marked as a Customer, a "Customer Since’ date field is updated with today's date. Since the addition of the flow, two Account Plan records are created whenever the Account is marked as a Customer.

What might cause this to happen?

A.

The Apex trigger does not use a static variable to ensure it only fires once.

B.

The flow is configured to use an "Update Records’ element.

C.

The Apex trigger is not bulk safe and calls insert inside of a for loop.

D.

The flow is configured to evaluate when a record is created and every time it is edited.

A developer has working business logic code, but sees the following error in the test class:

You have uncommitted work pending. Please commit or rollback before calling out.

What is a possible solution?

A.

Call support for help with the target endpoint, as It is likely an external code error.

B.

Use mast. T=RunningTes={} before making the callout to bypass it in test execution,

C.

Set seeAllData to true the top of the test class, since the code does not fall in practice.

D.

Rewrite the business logic and test classes with @Testvisible set on the callout.

A Salesforce org has more than 50,000 contacts. A new business process requires a calculation that aggregates data from all of these contact records. This calculation needs to run once a day after business hours.

which two steps should a developer take to accomplish this?

Choose 2 answers

A.

B.

C.

D.

Refer to the code snippet below:

A custom object called Credit_Memo__c exists in a Salesforce environment. As part of a new feature development that retrieves and

manipulates this type of record, the developer needs to ensure race conditions are prevented when a set of records are modified within an Apex

transaction.

In the preceding Apex code, how can the developer alter the query statement to use SOQL features to prevent race conditions within a transaction?

A)

B)

C)

D)

A.

Option A

B.

Option B

C.

Option C

D.

Option D

A Salesforce developer is hired by a multi-national company to build a custom

Lightning application that shows employees their employment benefits and earned

commissions over time. The application must acknowledge and respect the user's

locale context for dates, times, numbers, currency, and currency symbols.

When using Aura components, which approach should the developer implement to

ensure the Lightning application complies with the user's locale?

A.

Use the $User global variable to retrieve the user preferences.

B.

Use the $Label global value provider.

C.

Use the $Lacale value provider to retrieve the user preferences.

D.

Create a Hierarchical custom setting to store user preferences.

A developer wrote a class named asccuntRisteryManager that relies on field history tracking. The class has a static method called getaccountHistory that Lakes in an Account as a parameter and returns a list of associated accountHistory object records.

The following test fails:

What should be done to make this test pass?

A.

Create Accountdistory records manually in the test setup and write a query to get them.

B.

Use @isTest (SeeAllData=true] to see historical data from the org and query for Accountdistory records.

C.

Use Test. isRunningTest (] in getAccountHistory() to conditionally return fake AccountHistory records.

D.

The tact method should he delated since this code cannat be tested

A company wants to run different logic based on an Opportunity's record type.

Which code segment handles this request and follows best practices?

A)

B)

C)

D)

A.

Option A

B.

Option B

C.

Option C

D.

Option D

A developer is asked to replace the standard Case creation screen with a custom screen that takes users through a wizard before creating the Case. The org only has users running Lightning Experience.

What should the developer override the Case New Action with to satisfy the requirements?

A.

Lightning Page

B.

Lightning Record Page

C.

Lightning Component

D.

Lightning Flow

Universal Containers is using a custom Salesforce application to manage customer

support cases. The support team needs to collaborate with external partners to

resolve certain cases. However, they want to control the visibility and access to the

cases shared with the external partners. Which Salesforce feature can help achieve this requirement?

A.

Role hierarchy

B.

Criteria-based sharing rules

C.

Apex managed sharing

D.

Sharing sets

A developer is writing a Visualforce page that queries accounts in the system and presents a data table with the results. The users want to be able to filter the results based on up to five fields. However, the users want to pick the five fields to use as filter fields when they run the page.

Which Apex code feature is required to facilitate this solution?

A.

Streaming API

B.

Metadata APT

C.

variable binding

D.

dynamic SOQL

A developer is working on an integration between Salestorce and an external system. The integration requires sending a large amount of data to the external systern, which can cause long response times and timeouts.

To optimize the performance and avoid timeouts, which technique should be used?

A.

Use a chained batch Apex to split the data into smaller batches.

B.

Implement an asynchronous callout using the Continuation class,

C.

Increase the timeout limit in the callout options,

D.

Use the @future annotation to make the callout asynchronous.

A developer is asked to find a way to store sacret data with an ability to specify which profiles and users can access which secrets.

What should be used to store this data?

A.

system.Cookie class

B.

Custom settings

C.

Static resources

D.

Custom metadata

An org records customer order information in a custom object, ordar__c, that has

fields for the shipping address. A developer is tasked with adding code to calculate

shipping charges on an order, based on a flat percentage rate associated with the

region of the shipping address.

What should the developer use to store the rates by region, so that when the changes are deployed to production no additional steps are needed for the calculation to work?

A.

Custom hierarchy setting

B.

Custom metadata type

C.

Custom list setting

D.

Custom object

Consider the following code snippet:

How should the component communicate to the

component that an order has been selected by the user?

A.

Create and fire a component event.

B.

Create and fire an application event.

C.

Create and fire a standard DOM event.

D.

Create and dispatch a custom event,

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