Limited-Time Offer: Enjoy 50% Savings! Coupon code: 50OFF Use it at checkout
Skip to content

Free Salesforce Certified Platform Developer II Plat-Dev-301 Exam Questions

Last updated: · 14 practice questions with answers and explanations

Page: 1 / 11 Total 161 questions

Want more questions? Get Premium Access.

Question 1

New Single answer

Topic: SALESFORCE FUNDAMENTALS

Skill tested: Select the Salesforce platform best suited to a custom application and integration requirement.

A logistics company needs a browser-based shipment management application that uses Salesforce records, sharing, and authentication. The application must also provide a specialized scheduling interface and call an external optimization service. The team wants to minimize infrastructure administration and keep business data governed by Salesforce security. It does not need a separately hosted web runtime or a custom identity system. Which architecture is the best fit?

Correct Answer: A. Extend the Lightning Platform with Salesforce UI and Apex callouts to the optimization service.
Explanation:

The Lightning Platform is the natural fit because the application needs Salesforce-native records, sharing, authentication, and UI while adding specialized behavior through platform capabilities such as Apex callouts. Heroku can host separately scaled applications and services, but a separate runtime and replicated data store conflict with the stated preference to minimize infrastructure and keep Salesforce as the governed system of record. Fuel is not the appropriate named application platform for this requirement. A standalone application with nightly exports would weaken real-time access and duplicate security and data-management responsibilities.

Question 2

New Multiple answers

Topic: SALESFORCE FUNDAMENTALS

Skill tested: Distinguish standard-object capabilities and select appropriate objects for core sales records.

A subscription business is redesigning its sales data model. Sales representatives need to track prospective organizations before qualification, manage qualified selling engagements with products and expected revenue, and record organizations that have purchased. The implementation must use standard Salesforce capabilities where they fit, while retaining a process for converting qualified prospects into customer records and sales engagements. Which two statements correctly describe the standard-object design? Select two answers.

Correct Answer: B. Use Accounts for organizations and Opportunities for potential revenue-generating sales; add Products through Opportunity Products when needed.; C. Use Leads for unqualified prospects; qualifying and converting a Lead can create an Account and, as applicable, a Contact and Opportunity.
Explanation:

Leads are designed to represent unqualified prospects. Lead conversion can create or associate an Account and Contact and can create an Opportunity when appropriate. Accounts represent organizations or individuals in account-based processes, while Opportunities track potential sales; products and pricing can be represented with Opportunity Products. Opportunities do not serve as the standard initial prospect record, and Contacts do not replace Accounts as the organization-level record. Campaigns support marketing attribution and response management, but they are not required parents for Accounts or Opportunities.

Question 3

New Multiple answers

Topic: DATA MODELING AND MANAGEMENT

Skill tested: Choose Salesforce field types and data-model patterns for localized, multicurrency, and compound values.

A global service organization imports customer addresses and contract amounts from several regions. Users must see translated picklist labels in their own language, amounts must retain their transaction currency, and an integration must send address components as separate values. The integration also needs a stable external key for upserts. Which two design decisions best meet these requirements? Select two answers.

Correct Answer: B. Use a compound address field for display and access its individual address components where the API or Apex operation requires them.; C. Enable the required organization languages and use translated picklist values, while keeping stored picklist values consistent across languages.
Explanation:

Salesforce translation support lets users see translated picklist labels while the underlying picklist values remain suitable for consistent data processing. Address fields are compound for convenient representation but expose component fields for operations that need street, city, state, postal code, or country separately. Multicurrency should be modeled with Salesforce currency fields and the organization's currency configuration, not text or one field per currency. Formula fields are calculated and not writable as external IDs, so they cannot serve as the upsert key.

Question 4

New Single answer

Topic: DATA MODELING AND MANAGEMENT

Skill tested: Design metadata-driven configuration and select an appropriate external-ID upsert key.

A managed application stores routing rules that administrators may deploy between sandboxes and production. The rules are not business transactions and should not be edited by end users. Separately, an inbound billing feed supplies a stable customer identifier that must match or create Salesforce customer records without first querying Salesforce for each identifier. Which combination is most appropriate?

Correct Answer: A. Store routing rules in custom metadata types and mark the customer identifier field as an External ID for upsert operations.
Explanation:

Custom metadata types are suitable for deployable application configuration because their records can be packaged and deployed with metadata. A stable, unique external identifier marked as an External ID supports matching and upsert behavior from an integration without requiring a preliminary lookup by Salesforce ID. Ordinary custom object records are data rather than deployable configuration by default, hierarchy custom settings are not the best fit for this deployment-oriented rule set, and labels are intended for text rather than structured rules. Formula fields cannot be written as integration keys.

Question 5

New Single answer

Topic: LOGIC AND PROCESS AUTOMATION

Skill tested: Apply Salesforce record-save order when coordinating validation, triggers, and record-triggered flows.

An order trigger calculates a risk score before records are saved. A before-save record-triggered flow also sets a default risk category, and a validation rule rejects an order when the category conflicts with the calculated score. Users report that the rule sometimes evaluates an old score when updating an existing order. The business wants the category default available to the trigger, but the risk score must be calculated before the validation rule runs. What should the developer do?

Correct Answer: B. Move the category default into a before-save flow and calculate the score in a before trigger, relying on the documented before-save flow and before-trigger order.
Explanation:

Before-save record-triggered flows execute before before triggers in the record-save sequence, so the trigger can use the category value set by the flow. The before trigger can then calculate the score on the in-memory record before validation rules evaluate it. After-save automation does not run before validation, and an after-trigger DML update creates unnecessary recursion and cannot repair a validation decision already made in the original save. A flow that rejects data after commit cannot provide equivalent transaction-time validation.

Question 6

New Multiple answers

Topic: LOGIC AND PROCESS AUTOMATION

Skill tested: Choose asynchronous Apex patterns that reduce synchronous work and avoid limit pressure.

A case update must immediately set a small number of fields and return quickly to the user. It also initiates a large recalculation across many related records and an external notification callout. The recalculation can take several minutes, and failures must be retried independently of the user's save transaction. Which two design decisions are most appropriate? Select two answers.

Correct Answer: D. Keep the synchronous trigger work minimal, then enqueue a Queueable job to perform bounded asynchronous processing and make the callout using an appropriate callout-enabled job.; E. Use Batch Apex for the large record set when it exceeds a single transaction's practical processing needs, and track asynchronous job outcomes for recovery.
Explanation:

Moving nonessential work out of the user transaction protects synchronous response time and limits. Queueable Apex supports structured asynchronous work and can be configured for callouts; it is suitable for bounded processing. Batch Apex divides large data sets into separate execution scopes, making it more appropriate when one asynchronous transaction cannot handle the full workload. Triggers should not perform a lengthy recalculation or external callout inline. Future methods remain subject to limits and are not a substitute for scalable batch processing, while formulas cannot update related records.

Question 7

New Single answer

Topic: USER INTERFACE

Skill tested: Choose Visualforce controller patterns for paginated record lists and custom behavior.

A sales operations team uses a Visualforce page to review a filtered Opportunity list. The page must support Salesforce list-view behavior, pagination, and selection of records while adding a small amount of custom logic to the standard list experience. The developer wants to avoid querying and maintaining the full record collection in a custom controller. Which approach best meets the requirements?

Correct Answer: B. Use a standard set controller for the Opportunity list and a controller extension for the additional custom behavior.
Explanation:

A standard set controller is designed for Visualforce pages that work with record sets and provides list-oriented behavior such as pagination and selection. A controller extension can add the team's custom logic while retaining standard set-controller capabilities. A standard controller is oriented around an individual record, and loading every matching row into a custom collection risks query, heap, and view-state limits. Client-side loading of all records does not solve those scalability concerns and bypasses the required standard list behavior.

Question 8

New Single answer

Topic: USER INTERFACE

Skill tested: Implement a targeted Visualforce partial refresh using component rerendering and action status.

A Visualforce page displays an account summary and a related-contact table. Selecting a filter runs an Apex action that changes which contacts are shown. Users should see a loading indicator while the request runs, but the account summary must remain unchanged and should not be re-rendered. The page already uses an `apex:actionRegion` around the filter controls. Which implementation is best?

Correct Answer: A. Use an `apex:commandButton` with an action, set `reRender` to the contact table container, and associate an `apex:actionStatus` with the request.
Explanation:

Visualforce AJAX actions can invoke controller logic and re-render only specified components. Targeting the contact table container limits the update to the changed content, while `apex:actionStatus` can show request progress. A full-page submission refreshes more UI than required. Replacing the document body directly bypasses Visualforce's component lifecycle and is unnecessary. Re-rendering the account summary would update the wrong region and would not reliably refresh the filtered contacts.

Question 9

New Single answer

Topic: PERFORMANCE

Skill tested: Reduce Visualforce view state and database work through controller and query design.

A Visualforce page lets account managers review up to 100 selected cases. Its view state has grown substantially, and users report slow page responses. Inspection shows that the controller stores several large collections that are only used to render the current page, while a getter performs a SOQL query each time it is accessed. The page must preserve user selections during paging but does not need to submit the large display-only collections back to the server. What is the best remediation?

Correct Answer: C. Mark display-only properties as transient where appropriate, query once at a controlled point rather than in repeatedly invoked getters, and preserve only the selection state the workflow requires.
Explanation:

View state contains controller state needed across Visualforce postbacks; large display-only collections can inflate it unnecessarily. Transient properties are not serialized into view state, so they are suitable when the values can be recomputed. Queries should be performed deliberately and cached for the request rather than placed in getters that Visualforce may invoke multiple times. Increasing page size worsens payload and rendering cost. Static variables do not persist reliably across requests and are not a valid replacement for request state.

Question 10

New Multiple answers

Topic: INTEGRATION

Skill tested: Select Salesforce API and Apex service patterns for synchronous external integration.

A partner system must submit a shipment request to Salesforce and receive a structured response immediately. The partner requires a SOAP contract generated from the service interface, while another internal integration uses REST conventions and JSON. Both integrations need controlled Apex business logic and must enforce the caller's authorization. Which two approaches are appropriate? Select two answers.

Correct Answer: B. Expose an Apex class with a `webservice` method to provide a Salesforce-generated SOAP interface, and apply an appropriate sharing and access-control design.; D. Expose an `@RestResource` Apex class with `@HttpPost` for the JSON endpoint and validate inputs before invoking business logic.
Explanation:

Apex web services expose SOAP operations and provide a generated WSDL contract, matching the partner's interface requirement. An Apex REST resource with `@RestResource` and HTTP method annotations supports a custom REST endpoint, including JSON request and response handling. Both require thoughtful authorization, sharing, and input validation; declaring a service alone does not settle every security decision. Platform events are asynchronous messaging, not synchronous SOAP replies. Visualforce is not the Apex SOAP service mechanism, and Analytics API is for analytics access rather than transaction creation.

Question 11

New Multiple answers

Topic: INTEGRATION

Skill tested: Use Salesforce callout classes, mocks, and asynchronous execution for resilient integrations.

An Apex service sends shipment updates to a vendor's REST endpoint. The vendor may respond slowly, and updates originate from record changes, so the user's save must not wait for the network. The service must handle HTTP errors and be testable without making a real network request. Which two implementation choices are appropriate? Select two answers.

Correct Answer: A. Use `Test.setMock` with an `HttpCalloutMock` implementation to provide deterministic responses in Apex tests.; E. Perform the HTTP request using `HttpRequest` and `Http` from an asynchronous Queueable job configured to allow callouts.
Explanation:

The `Http`, `HttpRequest`, and `HttpResponse` classes provide Apex HTTP callout behavior. Enqueuing work in a callout-capable Queueable job keeps the user's record save independent of network latency and lets the job handle status codes and failures. `HttpCalloutMock` registered with `Test.setMock` supplies test responses without contacting the vendor. A trigger should not block on a remote callout, partial-success DML does not implement HTTP semantics, and Apex does not automatically retry every failed response.

Question 12

New Single answer

Topic: TESTING

Skill tested: Test callout integrations deterministically with HTTP mocks and assertions.

A developer has added an Apex service that sends a JSON payload to a partner and parses a successful response. The unit test currently attempts a real callout, which fails in the test environment. The team needs to validate the request method, endpoint, payload fields, and behavior for both a successful response and an HTTP error, without depending on partner availability. What should the test strategy use?

Correct Answer: B. Register an `HttpCalloutMock` through `Test.setMock`, return controlled success and error responses, and assert the generated request and service outcome.
Explanation:

Apex tests should isolate external dependencies. `HttpCalloutMock` lets a test return deterministic responses while inspecting the outgoing request, so the test can verify the HTTP method, endpoint, payload, parsing, and error handling. Tests should also assert meaningful outcomes rather than merely execute the code. `SeeAllData=true` exposes Salesforce data, not live external network access, and does not replace a callout mock. Manual execution in an anonymous window is not a repeatable unit test or a substitute for required test coverage.

Question 13

New Multiple answers

Topic: TESTING

Skill tested: Create isolated Apex tests for bulk triggers and asynchronous work using generated test data.

A trigger updates a related summary record when invoices are inserted and can enqueue a Queueable job for additional processing. The team wants tests that are independent of org data, verify behavior for bulk input, and confirm asynchronous effects. Which two practices best support those goals? Select two answers.

Correct Answer: C. Create the required Accounts, invoices, and related records in the test, then insert a collection of invoices in one operation to exercise bulk behavior.; E. Use `Test.startTest()` and `Test.stopTest()` around the action that enqueues the Queueable job, then assert the resulting records or state.
Explanation:

Tests should create their own data so they remain repeatable and do not depend on org contents. Inserting multiple records in one DML operation verifies that the trigger handles collections rather than relying on single-record assumptions. `Test.startTest()` and `Test.stopTest()` isolate the exercised limits and cause queued asynchronous work to run during the test, after which the test can assert its effects. `SeeAllData=true` introduces environmental dependence, while single-record tests and execution-only assertions provide inadequate behavioral coverage.

Question 14

New Single answer

Topic: DEBUG AND DEPLOYMENT TOOLS

Skill tested: Use Salesforce debug logs and execution details to locate governor-limit failures.

A newly deployed Apex transaction intermittently fails with a governor-limit exception during a bulk import. The failure is not reproducible with one record, and the developer needs to determine whether repeated SOQL, excessive DML, or recursive automation is responsible before changing code. The issue occurs only for a specific integration user, and the team can reproduce it in a sandbox. What should the developer do first?

Correct Answer: C. Set an appropriately scoped trace flag for the integration user, reproduce the bulk operation, and inspect the debug log's execution and limit events.
Explanation:

A trace flag scoped to the integration user captures the transaction that exhibits the failure. The debug log can show execution flow, repeated automation, SOQL and DML activity, and governor-limit usage, enabling the developer to distinguish query accumulation from recursion or other limit pressure. Deployment validation checks deployment readiness and tests, not a specific intermittent production-style transaction's runtime history. Schema Builder describes data relationships but not transaction limits. Permissions failures are distinct from governor-limit exceptions.