Salesforce Certified Platform Developer II practice questions

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.

Who the exam is for

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%.

Exam guide sections

Sample Platform Developer II questions

A developer must share Project__c records with a team in Apex, using a reason that survives owner changes. What should they do?

  • A. Use a custom Apex sharing reason
  • B. Use the Manual row cause
  • C. Create a sharing rule from Apex
  • D. Change the owner to the team's queue

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?

  • A. Database.setSavepoint() and Database.rollback()
  • B. Database.insert(lines, false) only
  • C. A future method for the lines
  • D. A try-catch block with no rollback

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?

  • A. Lightning Message Service
  • B. A CustomEvent that bubbles
  • C. A public @api method
  • D. A platform event

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

Common questions

What is the Platform Developer II exam like?

60 questions (5 unscored) in 120 minutes. Passing score: 70%.

Who is the Platform Developer II exam for?

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.

What does Platform Developer II cover?

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%).

How do I practise for Platform Developer II on CramForce?

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.

Related practice