Free Platform Developer II sample questions

Real questions from the Salesforce Certified Platform Developer II practice bank, with the correct answer and an explanation for each one. No junk, no filler.

Try them in the simulator Same questions, with study, timed and flashcard modes.

Showing 10 of 20 free sample questions.

Question 1Choose one

A financial services company uses a custom Apex REST service to receive transaction data from a third-party system. The service must process batches of up to 200 transactions, create corresponding custom `Transaction__c` records, and update the related `Account`. If any transaction in the batch is invalid, the entire operation must be rolled back, and a specific error message must be returned. Which Apex feature is most appropriate for maintaining transactional integrity in this scenario?

Question 2Choose one

A developer is building a Lightning Web Component to display a list of related `Case` records on an `Account` page. The component must be reusable and configurable by an administrator, allowing them to specify the `Status` and `Priority` to filter the cases shown. How should the developer implement this configurability for the Lightning App Builder?

Question 3Choose one

Universal Containers needs to synchronize large volumes of `Product__c` records (potentially over 1 million) nightly from an external Product Information Management (PIM) system. The process involves complex transformations and enrichment logic that cannot be handled by middleware. A developer has decided to implement this using Batch Apex. To optimize performance and avoid governor limit issues, what is the best approach for the `start` method to query the records to be processed?

Question 4Choose 2

A developer needs to write a unit test for a method that makes an HTTP callout to an external weather service. The test must verify the logic that parses the JSON response and updates a `Forecast__c` record. Which two approaches are necessary to ensure the test runs successfully without making a real callout and properly isolates the test data? (Select TWO)

Question 5Choose one

A Visualforce page uses a custom controller to display a data table of `Opportunity` records. The controller uses a large, complex SOQL query to gather the data. Users report that the page sometimes throws a 'Maximum view state size limit exceeded' error, especially when filtering results that return many rows. Which modification is the most effective way to mitigate this specific error?

Question 6Choose one

Quantum Logistics has a complex, multi-lingual Salesforce org. They need to store configuration data for a custom shipping calculator, including shipping rates, service levels, and country-specific surcharges. This configuration data must be deployable between sandboxes and production, and it needs to be easily queryable within Apex. The data structure is relational, with 'Service Levels' being a parent to 'Country Surcharges'. What is the most appropriate solution for storing this configuration data?

Question 7Choose one

A developer at a large enterprise is tasked with creating a nightly batch job that deactivates `Contact` records that have not been logged into a community for over 180 days. The org contains over 10 million `Contact` records. The initial SOQL query `SELECT Id FROM Contact WHERE LastLoginDate < LAST_N_DAYS:180` is timing out. What is the most effective way to resolve this query performance issue?

Question 8Choose one

True or False: When using the `Database.upsert` method with an External ID field, if multiple records in the database match the provided External ID, the operation will throw a DML exception.

Question 9Choose one

A developer needs to expose an Apex method that can be called from a Process Builder or Flow. The method should accept a list of `Opportunity` IDs and perform a complex calculation that is not possible with declarative tools. Which annotation must be used for the Apex method?

Question 10Choose one

A business process requires that when an Opportunity is updated, a callout is made to an external system to reserve inventory. This callout must not delay the saving of the Opportunity record. If the callout fails, it should be automatically retried up to three times. Which asynchronous Apex pattern best meets all these requirements?

10 more free samples are waiting

Create a free account to unlock the whole Platform Developer II sample bank, or get full access to all 251 practice questions in the simulator.

Create account