Practice questions for the Salesforce Certified Platform Developer II exam, organised by the official exam guide sections and weights, with explanations and links to the documentation. See your readiness per section. Free to start.
Practice for the Salesforce Certified Platform Developer II exam, weighted by the official exam guide.
For developers with 2-4 years of experience, including at least a year on the Salesforce Platform, who design and build complex, scalable Apex, Lightning Web Components, integrations and tests. Requires the Platform Developer certification.
The real exam: 60 questions (5 unscored), 120 minutes. Passing score: 70%.
A developer must share Project__c records with a team in Apex, using a reason that survives owner changes. What should they do?
Answer: A. Use a custom Apex sharing reason
Apex managed sharing writes to the object's __Share table with a custom Apex sharing reason (row cause). Unlike manual sharing, which is removed when the owner changes, Apex managed sharing is kept. Sharing rules are metadata, not created from Apex.
A method inserts an Order, then its lines. If any line fails, the Order must not be saved, but the method must keep running. What should the developer use?
Answer: A. Database.setSavepoint() and Database.rollback()
A savepoint records the database state; rolling back to it discards DML done after it, so the Order insert can be undone while the code continues. allOrNone=false allows partial success, the opposite of the need, and catching alone keeps the Order.
A Lightning web component in the utility bar must send a message to an Aura component and a Visualforce page on the same Lightning page. What should it use?
Answer: A. Lightning Message Service
Lightning Message Service communicates across the DOM between Lightning web components, Aura components and Visualforce pages on a Lightning page, including utility bar components. DOM events and @api methods only reach components in the same tree, and platform events are server-side.
Start practising Platform Developer II
60 questions (5 unscored) in 120 minutes. Passing score: 70%.
For developers with 2-4 years of experience, including at least a year on the Salesforce Platform, who design and build complex, scalable Apex, Lightning Web Components, integrations and tests. Requires the Platform Developer certification.
The exam guide has 5 sections: Advanced Developer Fundamentals (15%), Process Automation, Logic, and Integration (27%), User Interface (20%), Testing, Debugging, and Deployment (20%), Performance (18%).
Answer practice questions organised by the official exam guide sections and weights. Every question has an explanation and a link to the documentation, and CramForce shows your readiness per section. You can try a few questions without an account, and keep practising free once you sign up.