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

Questions 21

A developer is asked to build a solution that will automatically send an email to the customer when an Opportunity stage changes. The solution must scale to allow for 10,000 emails per day. The criteria to send the email should be evaluated after certain conditions are met. What is the optimal way to accomplish this?

Options:
A.

Use an Apex trigger with Batch Apex.

B.

Use an Email Alert with Flow Builder.

C.

Use MassEmailMessage() with an Apex trigger.

D.

Use SingleEmailMessage() with an Apex trigger.

Salesforce PDII Premium Access
Questions 22

Refer to the following code snippet:

Java

public class LeadController {

public static List getFetchLeadList(String searchTerm, Decimal aRevenue) {

String safeTerm = '%'+searchTerm.escapeSingleQuotes()+ '%';

return [

SELECT Name, Company, AnnualRevenue

FROM Lead

WHERE AnnualRevenue >= :aRevenue

AND Company LIKE :safeTerm

LIMIT 20

];

}

}

A developer created a JavaScript function as part of a Lightning web component (LWC) that surfaces information about Leads by wire calling getFetchLeadList when certain criteria are met. Which three changes should the developer implement in the Apex class above to ensure the LWC can display data efficiently while preserving security?1

Options:
A.

Use the WITH SECURITY_ENFORCED clause within the SOQL query.

B.

Implement the with sharing keyword in the class declaration.567

C.

Annotate 8the Apex method with @AuraEnabled(Cacheable=true).

D.

Implement the without sharing keyword in the class declaration.

E.

Annotate the Apex method with @AuraEnabled.

Questions 23

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?

Options:
A.

Use the @future annotation.

B.

Implement the Database.Batchable interface.

C.

Implement the Schedulable interface.

D.

Implement the Queueable interface.

Questions 24

A developer built an Aura component for guests to self-register upon arrival at a front desk kiosk. Now the developer needs to create a component for the utility tray to alert users whenever a guest arrives at the front desk. What should be used?

Options:
A.

DML Operation

B.

ChangeLog

C.

Application Event

D.

Component Event16

Questions 25

A developer is asked to develop a new AppExchange application. A feature creates Survey records when a Case reaches a certain stage. This needs to be configurable, as different Salesforce instances require Surveys at different times. Additionally, the app needs to come with a set of best practice settings. What should the developer use to store and package the custom configuration settings for the app?

Options:
A.

Custom settings

B.

Custom objects

C.

Custom metadata

D.

Custom labels

Questions 26

Which two queries are selective SOQL queries and can be used for a large data set of 200,000 Account records?

Options:
A.

SELECT Id FROM Account WHERE Id IN (List of Account Ids)

B.

SELECT Id FROM Account WHERE Name IN (List of Names) AND Customer_Number__c = 'ValueA'

C.

SELECT Id FROM Account WHERE Name != ''

D.

SELECT Id FROM Account WHERE Name LIKE '%Partner'

Questions 27

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?

Options:
A.

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

B.

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

C.

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

D.

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

Questions 28

A developer is asked to find a way to store secret data with an ability to specify which profiles and users can access which secrets. What should be used to store this data?

Options:
A.

Static resources

B.

Custom metadata

C.

Custom settings

D.

System.Cookie class

Questions 29

Which Salesforce feature allows a developer to see when a user last logged in to Salesforce if real-time notification is not required?

Options:
A.

Asynchronous Data Capture Events

B.

Calendar Events

C.

Event Monitoring Log

D.

Developer Log

Questions 30

Which use case can be performed only by using asynchronous Apex?

Options:
A.

Querying tens of thousands of records

B.

Making a call to schedule a batch process to complete in the future

C.

Calling a web service from an Apex trigger

D.

Updating a record after the completion of an insert1

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.