Free Salesforce Platform Developer II Practice Test Questions

161 questions Updated 23-Nov-2026
Question 21 Choose 1
A developer wrote the following method to find all the test accounts in the org:

What should be used to fix this failing test?
Question 22 Choose 2
Consider the following code snippet:

Java
trigger OpportunityTrigger on Opportunity (before insert, before update) {
for(Opportunity opp : Trigger.new){
OpportunityHandler.setPricingStructure(Opp);
}
}
public class OpportunityHandler{
public static void setPricingStructure(Opportunity thisOpp){
Pricing_Structure_c ps = [Select Type_c FROM Pricing_Structure_c WHERE industry_c =
:thisOpp.Account_Industry_c];
thisOpp.Pricing_Structure_c = ps.Type_c;
update thisOpp;
}
}

Which two best practices should the developer implement to optimize this code?
Choose 2 answers
Question 23 Choose 1
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 the Accounts and 10,000 Campaign Member records across the contacts.

What will happen when the mass update occurs?
Question 24 Choose 1
A developer is writing a Jest test for a Lightning web component that conditionally displays child components based on a user's checkbox selections. What should the developer do to properly test that the correct components display and hide for each scenario?
Question 25 Choose 1
A company accepts orders for customers in their enterprise resource planning (ERP) system that must be integrated into Salesforce as order_ c records with a lookup field to Account. The Account object has an external ID field, ENF_Customer_ID_c.
What should the Integration use to create new Oder_c records that will automatically be related to the correct Account?
Question 26 Choose 1
Universal Containers analyzes a Lightning web component and its Apex controller class that retrieves a list of contacts associated with an account. The code snippets are as follows:

Based on the code snippets, what change should be made to display the contacts’ mailing addresses in the Lightning web component?
Question 27 Choose 1
Universal Containers develops a Salesforce application that requires frequent interaction with an external REST API.
To avoid duplicating code and improve maintainability, how should they implement the APL integration for code reuse?
Question 28 Choose 1
An Aura component has a section that displays some information about an Account and it works well on the desktop, but users have to scroll horizontally to see the description field output on their mobile devices and tablets.
Question 29 Choose 1
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?
Question 30 Choose 1
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?

Experience the real exam before you take it

Our timed 2026 Salesforce Platform Developer II practice test mirrors the format, number of questions and time limit of the official exam.

The #1 challenge isn't just knowing the material, it's managing the clock. The simulation builds your speed and stamina, so you walk in knowing exactly what to expect.

Take Salesforce Platform Developer II practice exam
  • Build exam stamina: stay focused and accurate for the entire duration.
  • Master time management: learn to pace yourself so you never have to rush.
  • A new test every time: a randomised set from the Salesforce Platform Developer II (Plat-Dev-301) question pool on every attempt.
  • Unlimited attempts: practice until you're 100% confident, not just once.