Big Black Friday Sale 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: sale65best

Free Salesforce PDII Practice Exam with Questions & Answers | Set: 2

Questions 11

A developer is tasked with creating a Lightning web component that allows users to create a Case for a selected product, directly from a custom Lightning page. The input fields in the component are displayed in a non-linear fashion on top of an image of the product to help the user better understand the meaning of the fields. Which two components should a developer use to implement the creation of the Case from the Lightning web component?161718

Options:
A.

lightning-record-form192021

B.

lightning-record-edit-form222324

C.

lightnin25g-input-field2627

D.

lightning-input2829

Salesforce PDII Premium Access
Questions 12

A business currently has a labor-intensive process to manually upload orders from an external OMS. Accounts must be exported to get IDs to link the orders. Which two recommendations should make this process more efficient?

Options:
A.

Use the insert wizard in the Data Loader to import the data.

B.

Ensure the data in the file is sorted by the order ID.

C.

Use the upsert wizard in the Data Loader to import the data.

D.

Identify unique fields on Order and Account and set them as External IDs.

Questions 13

Consider the queries in the options below and the following information:

    For these queries, assume that there are more than 200,000 Account records.

    These records include soft-deleted records in the Recycle Bin.

    There are two fields marked as External Id: Customer_Number__c and ERP_Key__c.

Which two queries are optimized for large data volumes?

Options:
A.

SELECT Id FROM Account WHERE Name != '' AND Customer_Number__c = 'ValueA'

B.

SELECT Id FROM Account WHERE Name != '' AND IsDeleted = false

C.

SELECT Id FROM Account WHERE Name != NULL

D.

SELECT Id FROM Account WHERE Id IN :aListVariable

Questions 14

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?

Options:
A.

Apex managed sharing23

B.

Sharing sets24

C.

Role hierarchy25

D.

Criteria-based sharing rules26

Questions 15

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

```java

public class CaseTriggerHandler {

public static void handle(List cases) {

for (Case c : cases) {

c.Edit_Count__c = c.Edit_Count__c + 1;

}

}

}

trigger on Case(before update) {

CaseTriggerHandler.handle(Trigger.new);

}

```

A new before-save record-triggered flow on the Case object was just created in production for when a Case is created or updated. Since the process was added, there are reports that `Edit_Count__c` is being incremented more than once for Case edits. Which Apex code fixes this problem?

Options:
A.

```java

public class CaseTriggerHandler {

public static Boolean firstRun = true;

public static void handle(List cases) {

for (Case c : cases) {

B.

Edit_Count__c = c.Edit_Count__c + 1;

}

}

}

trigger on Case(before update) {

CaseTriggerHandler.firstRun = true;

if (CaseTriggerHandler.firstRun) {

CaseTriggerHandler.handle(Trigger.newMap);

}

CaseTriggerHandler.firstRun = false;

}

```

C.

```java

public class CaseTriggerHandler {

public static Boolean firstRun = true;

public static void handle(List cases) {

for (Case c : cases) {

D.

Edit_Count__c = c.Edit_Count__c + 1;

}

}

}

trigger on Case(before update) {

if (CaseTriggerHandler.firstRun) {

CaseTriggerHandler.handle(Trigger.new);

}

CaseTriggerHandler.firstRun = false;

}

```

E.

```java

public class CaseTriggerHandler {

Boolean firstRun = true;

public static void handle(List cases) {

if (firstRun) {

for (Case c : cases) {

F.

Edit_Count__c = c.Edit_Count__c + 1;

}

}

firstRun = false;

}

}

trigger on Case(before update) {

CaseTriggerHandler.handle(Trigger.new);

}

```

G.

```java

trigger on Case(before update) {

Boolean firstRun = true;

if (firstRun) {

CaseTriggerHandler.handle(Trigger.newMap);

}

firstRun = false;

}

```

Questions 16

Consider the Apex class below that defines a RemoteAction used on a Visualforce search page.

Java

global with sharing class MyRemoter {

public String accountName { get; set; }

public static Account account { get; set; }

public MyRemoter() {}

@RemoteAction

global static Account getAccount(String accountName) {

account = [SELECT Id, Name, NumberOfEmployees FROM Account WHERE Name = :accountName];

return account;

}

}

Which code snippet will assert that the remote action returned the correct Account?

Options:
A.

Java

MyRemoter remote = new MyRemoter();

Account a = remote.getAccount('TestAccount');

System.assertEquals( 'TestAccount', a.Name );

B.

Java

MyRemoter remote = new MyRemoter('TestAccount');

Account a = remote.getAccount();

System.assertEquals( 'TestAccount' , a.Name );

C.

Java

Account a = controller.getAccount('TestAccount');

System.assertEquals( 'TestAccount', a.Name );

D.

Java

Account a = MyRemoter.getAccount('TestAccount');

System.assertEquals( 'TestAccount', a.Name );

Questions 17

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?3

Options:
A.

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

B.

Create a Hierarchical custom setting to store user preferences.5

C.

Use the $Locale value provider to retrieve the user preferences.67

D.

Use the $Label global value provider.89

Questions 18

A large company uses Salesforce across several departments. Each department has its own Salesforce Administrator. It was agreed that each Administrator would have their own sandbox in which to test changes. Recently, users notice that fields that were recently added for one department suddenly disappear without warning. Which two statements are true regarding these issues and resolution?3637

Options:
A.

The administrators are deploying their own Change Sets, thus deleting each other's fields from the objects in production.3839

B.

The admin40istrators are deploying their own Change Sets over each othe41r, thus replacing entire Page Layouts in production.

C.

Page Layouts should never be deployed via Change Sets, as this causes Field-Level Security to be reset and fields to disappear.42

D.

A sandbox should be created to use as a unified testing environment instead of deploying Change Sets directly to produ43ction.

Questions 19

An Aura component has a section that displays some information about an Account and it works well on the desktop, but we have to scroll horizontally to see the description field output on their mobile devices and tablets.

HTML

{!v.rec.Name}

{!v.rec.Description__c}

How should a developer change the component to be responsive for mobile and tablet devices?

Options:
A.

HTML

{!v.rec.Name}

{!v.rec.Description__c}

B.

1

HTML

{!v.rec.Name}

{!v.rec.Description__c}

C.

HTML

{!v.rec.Name}

{!v.rec.Description__c}

D.

HTML

{!v.rec.Name}

{!v.rec.Description__c}

Questions 20

There are user complaints about slow render times of a custom data table within a Visualforce page that loads thousands of Account records at once. What can a developer do to help alleviate such issues?

Options:
A.

Use the transient keyword in the Apex code when querying the Account records.

B.

Upload a third-party data table library as a static resource.

C.

Use the standard Account List controller and implement pagination.

D.

Use JavaScript remoting to query the accounts.

Exam Code: PDII
Certification Provider: Salesforce
Exam Name: Salesforce Certified Platform Developer II ( Plat-Dev-301 )
Last Update: Jan 19, 2026
Questions: 161

Salesforce Free Exams

Salesforce Free Exams
Examstrack provides free Salesforce exam prep materials and practice tests to support your Salesforce certification goals.