ExamDumpster

Free PDI sample questions

Here are free PDI sample questions with answers and explanations for each. They cover governor limits, SOQL queries and trigger logic. Work through the code questions slowly, line by line, as you would in a code review.

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

Showing 10 of 20 free sample questions.

Question 1Choose one

A developer is writing an Apex trigger on the `Case` object. The trigger needs to execute different logic based on whether the record was created from the UI or through a data load via the API. Which Apex method can be used within the trigger to determine the execution context?

Question 2Choose one

A consultant is deploying a change set from a Developer Sandbox to a Full Sandbox for user acceptance testing (UAT). The change set contains Apex classes, triggers, and a custom object. The deployment fails due to test failures. Upon investigation, the developer finds that the failing tests rely on specific Account and Contact records that exist in the Developer Sandbox but not in the Full Sandbox. What is the best practice for resolving this issue?

Question 3Choose one

A developer needs to create a custom user interface that allows sales reps to quickly create a new Opportunity and its related Opportunity Contact Roles on a single screen. The solution must be available within the Salesforce mobile app. Which technology provides the most modern, responsive, and performant solution for this requirement?

Question 4Choose one

An organization has a business rule that an Account's `BillingCountry` must be 'USA' if its `Industry` is 'Government'. Which is the simplest and most efficient tool to enforce this data integrity rule?

Question 5Choose 2

A developer has the following Apex code snippet intended to update the description of 250 accounts: ```apex List accountsToUpdate = [SELECT Id FROM Account LIMIT 250]; for (Account acc : accountsToUpdate) { Account updatedAcc = [SELECT Id, Description FROM Account WHERE Id = :acc.Id]; updatedAcc.Description = 'Updated by Apex'; update updatedAcc; } ``` What are the primary issues with this code? (Select TWO)

Question 6Choose one

Case Study: Universal Containers (UC) is implementing a new quality assurance (QA) process. They have a custom object, `QA_Review__c`, which has a lookup relationship to the `Case` object. The QA team needs a central place to view all Cases with their associated QA Reviews. The business has provided the following requirements: 1. A Visualforce page must be created to display a list of all Cases. 2. For each Case in the list, the user should be able to see the `Status__c` and `Score__c` from the most recent related `QA_Review__c` record. 3. The solution must be performant and not exceed governor limits, even with thousands of Cases. 4. The page should be accessible via a custom tab. A developer needs to design the Apex controller to support this Visualforce page. Which approach for fetching and structuring the data is most efficient and scalable?

Question 7Choose 3

A developer needs to deploy a new Apex class and a new custom field on the Account object from a sandbox to production. They are using a change set. Which steps must be taken to ensure a successful deployment? (Select THREE)

Question 8Choose one

The Model-View-Controller (MVC) architectural pattern is fundamental to the Lightning Platform. Which Salesforce feature correctly corresponds to the 'Model' component of the MVC pattern?

Question 9Choose one

A developer needs to prevent recursive execution in an Opportunity trigger. The trigger updates a field on related Account records, which in turn causes the Account trigger to fire and update the original Opportunity, creating a loop. What is the standard, best-practice technique to prevent this recursion?

Question 10Choose one

An architect is designing a data model for a recruiting application. There are three custom objects: `Position__c`, `Candidate__c`, and `Application__c`. A candidate can apply for multiple positions, and a position can have multiple candidates. The `Application__c` object represents a single candidate's application for a specific position. If a `Position__c` record is deleted, all related `Application__c` records must also be deleted. However, deleting a `Candidate__c` should not delete their `Application__c` records; instead, it should prevent the deletion if applications exist. How should the relationships for the `Application__c` object be configured? graph TD Position -- "Master-Detail" --> Application Candidate -- "Lookup" --> Application

10 more free samples are waiting

Create a free account to unlock the whole PDI sample bank, or get full access to all 535 practice questions in the simulator.

Create account