BLACK FRIDAY SALE – Unlock Up to 25% OFF on All Exam Prep! - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Salesforce Plat-Dev-301 Exam Questions

Exam Name: Salesforce Certified Platform Developer II Exam
Exam Code: Plat-Dev-301
Related Certification(s): Salesforce Platform Developer II Certification
Certification Provider: Salesforce
Number of Plat-Dev-301 practice questions in our database: 161 (updated: Dec. 01, 2026)
Expected Plat-Dev-301 Exam Topics, as suggested by Salesforce :
  • Topic 1: Advanced Developer Fundamentals: Covers coding for localization and multi-currency, using sharing objects and Apex managed sharing, and choosing the right custom metadata or custom settings approach.
  • Topic 2: Process Automation, Logic, and Integration: Covers designing and justifying declarative vs. programmatic automation, writing robust Apex triggers with proper error handling, using advanced SOQL, applying asynchronous and dynamic Apex, and implementing platform events and integration techniques.
  • Topic 3: User Interface: Covers building and troubleshooting Apex controllers for LWC/Aura, using Visualforce for actions and partial refreshes, handling UI errors, selecting the right UI technology, ensuring responsive design, managing component communication, and using static resources.
  • Topic 4: Testing, Debugging, and Deployment: Covers advanced Apex testing with mocks and stubs, testing/debugging LWC, Aura, Visualforce, and JavaScript, root-cause analysis of failing code, and source-driven deployment processes.
  • Topic 5: Performance: Covers identifying and fixing UI performance issues, optimizing queries and logic for large data volumes, improving performance via asynchronous callouts, applying code reuse, and identifying inefficiencies in sample code.
Disscuss Salesforce Plat-Dev-301 Topics, Questions or Ask Anything Related
0/2000 characters

Olga Martin

23 days ago
I managed to pass Platform Developer II once I got serious about process automation and knowing what belongs in Flow versus Apex. The exam rewarded clear thinking about maintainability and when declarative tools are sufficient.
upvoted 0 times
...

Sakura Zhang

1 month ago
User Interface. Questions often present a Lightning component bug or performance issue and ask whether LWC or Aura, server caching, or client-side rendering is the root cause. Review component lifecycle, wire/adapters, Lightning Data Service, and how client-server data flow affects performance and testability.
upvoted 0 times
...

Aiko Yang

2 months ago
I passed Plat Dev 301 by spending extra time on performance and data access, because the tradeoffs between queries, caching, and limits can be subtle. Reviewing execution logs and optimizing a few slow methods in real code was the best prep.
upvoted 0 times
...

Sigrid Laurent

2 months ago
Logic and Integration. You’ll see integration design scenarios comparing REST versus SOAP, how callouts behave in transactions, and when to use Platform Events or outbound messaging. Learn named credentials, mock callouts for tests, retry patterns, and callout limits so you can reason through the best integration approach.
upvoted 0 times
...

Ruqayyah Hossain

3 months ago
I managed to pass the Salesforce Certified Platform Developer II exam by drilling testing and debugging, especially tricky edge cases around bulk data and governor limits. Writing my own unit tests for common scenarios made the questions feel familiar.
upvoted 0 times
...

Freya Rossi

3 months ago
Process Automation. Many questions present a business requirement and ask whether to implement it with Flow, Process Builder, or a trigger and how order of execution impacts results. A colleague passed the exam after practicing those scenarios and thanked Pass4Success for a concise collection of exam-style questions that helped prepare quickly focus on flow types, recursion control, and order of execution.
upvoted 0 times
...

Mark Evans

4 months ago
I passed Platform Developer II after focusing on integration patterns and async Apex, since the exam leaned heavily on when to use each option. Building small proof of concepts in a dev org helped the concepts stick far better than rereading notes.
upvoted 0 times
...

Laura Evans

4 months ago
Advanced Developer Fundamentals. Expect scenario-based code snippets that ask which governor limits will be hit or which pattern to use in a multi-transaction flow. Brush up on bulkification, transaction boundaries, common Apex patterns, and how limits behave across sync and async contexts.
upvoted 0 times
...

Free Salesforce Plat-Dev-301 Exam Actual Questions

Note: Premium Questions for Plat-Dev-301 were last updated On Dec. 01, 2026 (see below)

Question #1

What is the best practice to initialize a Visualforce page in a test class?

Reveal Solution Hide Solution
Correct Answer: C

When writing unit tests for Visualforce controllers, the code must be executed within a simulated 'Page Context.' Without setting this context, methods that rely on ApexPages.currentPage() (such as retrieving URL parameters or adding page messages) will fail with a null pointer exception.

The standard and correct syntax to set this context is Test.setCurrentPage(Page.MyTestPage); (Option C). The Page reference (e.g., Page.MyTestPage) is a special system variable that represents the URL of the Visualforce page. Passing this into Test.setCurrentPage() tells the Apex testing engine: 'Act as if the browser is currently looking at this specific page.'

Options A and B use incorrect syntax that does not exist in the Apex language. Option D is a secondary step; you use .getParameters().put() after setting the current page to simulate passing specific values (like an ID) in the URL. By properly initializing the page context using Option C, the developer ensures that the controller's logic---including constructors and action methods---can be tested accurately and reliably.


Question #2

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?

Reveal Solution Hide Solution
Correct Answer: A

The requirement is to allow users to select which fields they want to filter by at runtime. In standard (static) SOQL, the fields in the WHERE clause must be defined at compile time (e.g., WHERE Name = :val). Because the fields themselves are not known until the user interacts with the page, the developer cannot write a static query.

Dynamic SOQL is the required feature. It allows the developer to construct the SOQL query string as a text string at runtime, incorporating the specific field names selected by the user, and then execute that string using Database.query(queryString). This provides the flexibility to build queries on the fly based on user input. Metadata API is for configuration changes, Streaming API is for push notifications, and Variable binding (:var) is used in both static and dynamic SOQL but does not solve the issue of changing the field names themselves.


Question #3

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?

Reveal Solution Hide Solution
Correct Answer: B, C

This scenario presents two distinct requirements: processing a large volume of data (50,000 records) and running the process at a specific time (once a day after business hours).

Database.Batchable (Option B): Processing 50,000 records in a single synchronous transaction will exceed Apex Governor Limits (specifically the CPU time limit or the heap size limit). Batch Apex allows the system to process these records in smaller chunks (batches), ensuring that the calculation completes without hitting limits.

Schedulable (Option C): To ensure the job runs 'once a day after business hours,' the Schedulable interface is required. The developer allows the class to be scheduled via the Apex Scheduler or the UI.

The standard pattern for this use case is to create a class that implements Schedulable, and inside its execute method, instantiate and execute the Batch class (Database.executeBatch). This combines precise timing with bulk processing capabilities.


Question #4

The Account after-update trigger fires whenever an Account's address is updated, and it updates every associated Contact with that address. The Contact after-update trigger fires on every edit, and it updates every Campaign Member record related to the Contact with the Contact's state. Consider the following: A mass update of 200 Account records' addresses, where each Account has 50 Contacts. Each Contact has one Campaign Member. This means there are 10,000 Contact records across th23e Accounts and 10,000 Campaign Member records across the contacts. What will happen when the mass update occurs?24252627

Reveal Solution Hide Solution
Correct Answer: C

38

In Salesforce, all triggers that fire as a result of an initial DML operation ru39n within the same execution context and the same transaction. This means that all governor limits---such as the limit of 10,000 records processed by DML statements---are shared across the entire chain of events.

In this scenario, the transaction begins with the update of 200 Accounts. The Account trigger then attempts to update 10,000 related Contacts (50 Contacts per Account across 200 Accounts). This update of 10,000 Contacts then fires the Contact trigger, which attempts to update 10,000 related Campaign Members. When the system attempts to process these updates, the total number of records processed via DML in a single transaction will exceed the platform limit of 10,000 rows.

Even though the Account update is only 200 records, the subsequent cascading updates (10,000 Contacts + 10,000 Campaign Members) bring the total DML count to 20,200. This triggers a LimitException, and because Apex transactions are atomic, the entire operation will fail and roll back. To resolve this, the developer would need to handle these updates asynchronously (e.g., using Batch Apex or Queueable) to split the cascading updates into separate transactions with their own sets of governor limits.

==========


Question #5

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?

Reveal Solution Hide Solution
Correct Answer: C

18

In the Aura Component framework, communication between components is handled via events. When two components need to communicate but do19 not share a direct parent-child relationship---such as a kiosk registration component on a page and an alert component residing in the global utility tray---an Application Event (Option C) is required.

Application events follow a 'publish-subscribe' model. One component fires the event, and any other component in the application that has a handler for that specific event type can listen for and react to it, regardless of where they sit in the component hierarchy. This is distinct from a Component Event (Option D), which is restricted to bubbling up the component containment hierarchy (from child to parent).

While modern implementations might also consider the Lightning Message Service (LMS) for cross-framework communication (between Aura, LWC, and Visualforce), within the specific context of Aura-to-Aura communication for decoupled components like utility bar items, Application Events remain the fundamental architectural solution. DML Operations (Option A) and ChangeLogs (Option B) are database-level concepts and do not provide the real-time, client-side notification capabilities needed for a UI alert system.

==========



Unlock Premium Plat-Dev-301 Exam Questions with Advanced Practice Test Features:
  • Select Question Types you want
  • Set your Desired Pass Percentage
  • Allocate Time (Hours : Minutes)
  • Create Multiple Practice tests with Limited Questions
  • Customer Support
Get Full Access Now

Save Cancel