Skip to content

Salesforce Certified Platform Developer I Practice Questions

Prepare for DEV-450 with more than an answer.

169 questions in the full set20 sample questionsUpdated Mar 12, 2026

Unlock the full exam and previous versions

  • v1Salesforce Certified Platform Developer I 166 questions Locked
  • DEV-450Legacy Salesforce Certified Platform Developer I 169 questions Current
  • PDILegacy Salesforce Certified Platform Developer I 200 questions Locked
Exam fee
$200 USD
Level
Professional
Valid for
Must complete maintenance modules for each release
Domains covered on the exam 6
  1. Salesforce Fundamentals7%
  2. Data Modeling and Management13%
  3. Logic and Process Automation38%
  4. User Interface25%
  5. Testing7%
  6. Debug and Deployment Tools10%
  1. 1

    A developer has a requirement to process 200,000 CampaignMember records nightly to update their status based on complex criteria that cannot be achieved with declarative tools. The processing for each record is independent but must be completed without hitting governor limits. Which asynchronous Apex feature is the best choice for this scenario?

    Show answer details

    Correct answer: C

    Batch Apex is specifically designed for processing large numbers of records asynchronously. It breaks the job into manageable chunks (batches), and each chunk is processed in a separate transaction with its own set of governor limits. This allows the job to process millions of records without exceeding limits. The start, execute, and finish methods provide a clear structure for querying records, processing them in batches, and performing final actions.

  2. 2

    When writing an Apex unit test, what is the purpose of the Test.startTest() and Test.stopTest() methods?

    Show answer details

    Correct answer: B

    The Test.startTest() and Test.stopTest() block serves two primary purposes. First, it creates a new, separate context for governor limits, allowing you to isolate the code you are specifically testing from test setup code. Second, any asynchronous processes (like @future or Queueable Apex) called after Test.startTest() are guaranteed to finish execution before the code after Test.stopTest() runs, allowing you to assert their results.

  3. 3

    A developer needs to create a custom user interface for a complex, multi-step business process. The UI must be highly responsive, work seamlessly on mobile devices, and leverage modern web standards. Which UI framework should be the primary choice for this new development?

    Show answer details

    Correct answer: C

    Lightning Web Components (LWC) is Salesforce's modern UI framework built on current web standards like Web Components, ES6+ JavaScript, and custom elements. It is designed for high performance, responsiveness, and mobile-first development. For any new custom UI development on the Salesforce platform, LWC is the recommended and superior choice over the older Visualforce and Aura frameworks.

  4. 4

    Case Study: A global logistics company, ShipFast, uses Salesforce to manage shipments and customer accounts. They have a custom object, Shipment__c, which has a Master-Detail relationship with the standard Account object. Each Shipment__c record has a Status__c picklist field (values: 'Pending', 'In Transit', 'Delivered', 'Cancelled') and a Weight_kg__c number field.

    New Requirement: The sales team wants to see two new fields on the Account record page: Total_Shipment_Weight__c and Has_Pending_Shipments__c. The Total_Shipment_Weight__c field should display the sum of the Weight_kg__c from all non-cancelled Shipment__c records. The Has_Pending_Shipments__c should be a checkbox that is checked if the account has at least one Shipment__c record with a status of 'Pending'. The solution must be efficient and avoid custom code if possible.

    How should a developer implement these requirements?

    Show answer details

    Correct answer: B

    This is the optimal declarative solution. The Master-Detail relationship between Account and Shipment__c allows for the use of Roll-Up Summary fields. The first Roll-Up Summary field can directly calculate the SUM of Weight_kg__c while filtering out 'Cancelled' shipments. The second Roll-Up Summary field can COUNT the number of 'Pending' shipments. A simple formula field can then reference this count to display a checkbox (IF(Pending_Shipment_Count__c > 0, true, false)), satisfying both requirements without any Apex code, which is more efficient and maintainable.

  5. 5

    A business process requires that when a high-value Opportunity is updated, a complex credit-worthiness calculation is performed, and an external risk assessment system is notified via a callout. The entire process must be auditable and allow for retries on failure. The logic is too complex for a flow. Which asynchronous Apex feature should be used?

    graph TD A[Opportunity Update] --> B{High Value?}; B -->|Yes| C[Perform Complex Calc]; C --> D[Callout to Risk System]; D --> E{Success?}; E -->|Yes| F[Log Success]; E -->|No| G[Log Failure & Allow Retry];
    Show answer details

    Correct answer: C

    Queueable Apex is the best choice here. It supports callouts, can handle complex sObjects as parameters (unlike future methods), and provides a job ID that can be used for monitoring and auditability. Crucially, a Queueable job can enqueue another job, which is a common pattern for implementing retry logic on failure. Batch Apex is for processing large data volumes, and future methods are simpler but lack the job ID and chaining capabilities needed for this requirement.

  6. 6

    A developer is tasked with creating a Visualforce page that displays a list of OpportunityLineItem records for a given Opportunity. The page must allow users to edit the Quantity and UnitPrice fields inline and save all changes with a single button click. The number of line items can exceed 100. Which controller approach is most suitable and efficient for this requirement?

    Show answer details

    Correct answer: C

    A custom controller with a wrapper class is the most robust solution. The wrapper class can encapsulate the OpportunityLineItem sObject and any additional properties needed for the page, such as a boolean for row selection or temporary edit values. This approach provides maximum flexibility for handling complex page logic, especially for inline editing of multiple records, without being constrained by the features of standard controllers. The save method can then iterate through the list of wrappers, collect the modified records, and perform a single DML update, which is efficient.

  7. 7

    A company has a business rule that when an Opportunity's StageName is updated to 'Closed Won', a corresponding Contract record must be created and linked to the Opportunity's Account. This process involves complex logic, including calling a web service to get a contract number. To ensure the system remains maintainable and scalable, which automation tool is the best fit for this requirement?

    Show answer details

    Correct answer: B

    An Apex trigger is the best choice because the requirement includes making a web service callout. While Flow can make callouts, performing a callout directly from a record-triggered path (like a trigger) must be done asynchronously to avoid holding up the database transaction. An Apex trigger can invoke an asynchronous Apex method (using the @future(callout=true) annotation) to perform the web service call. This cleanly separates the synchronous record update from the asynchronous external communication, which is a best practice and necessary to avoid a CalloutException.

  8. 8

    A developer needs to write an Apex test class for a trigger on the Case object. The trigger logic depends on the RecordType of the Case. To ensure the test is reliable and does not depend on existing data in the org, what is the recommended way to get the RecordTypeId within the test method?

    Show answer details

    Correct answer: C

    Using the Schema methods like getRecordTypeInfosByName() is the best practice for obtaining RecordType IDs within a test context. This approach is dynamic and does not rely on hard-coded IDs, which can change between environments (e.g., sandboxes, production). It also avoids making a SOQL query, which consumes a governor limit. Furthermore, it does not require SeeAllData=true, ensuring the test remains isolated and reliable.

  9. 9

    A financial services company is modeling its data in Salesforce. They have a custom object Financial_Advisor__c and another custom object Client__c. An advisor can manage many clients, but each client must be assigned to exactly one advisor. If an advisor leaves the company and their user record is deleted, all associated client records must also be deleted automatically. Which type of relationship should be created on the Client__c object to link it to the Financial_Advisor__c object?

    Show answer details

    Correct answer: A

    A Master-Detail relationship is the correct choice. This relationship type creates a tight coupling where the detail (child) record's existence depends on the master (parent) record. Key features that meet the requirements are: 1) The detail record inherits the sharing and security settings of the master record. 2) Deleting the master record automatically deletes all related detail records (cascade delete). 3) The relationship field on the detail record is required by default, ensuring every client is assigned to an advisor.

  10. 10

    A developer needs to deploy a new Apex class, a new Lightning Web Component, and a modification to an existing Profile from a Developer Sandbox to a Full Sandbox for UAT. Which deployment tools can be used to accomplish this? (Select TWO)

    Show answer details

    Correct answer: A, C

    Change Sets are a native Salesforce UI-based tool used to move metadata between connected orgs (like from a sandbox to another sandbox or production). They can package Apex classes, Lightning Web Components, and Profiles, meeting all the requirements of the scenario.

    The Salesforce CLI (SFDX) is a powerful command-line tool for Salesforce development and deployment. A developer can retrieve the specified metadata components from the source org and deploy them to the target org. This method offers more control, is scriptable, and is a core part of modern DevOps processes.

Create an account to continue.