Salesforce Certified Platform Developer I

Question bank

Salesforce logo

Salesforce Certified Platform Developer I

CRT-450

41 Salesforce Certified Platform Developer I questions with the correct answer and a written explanation, organised across 4 exam domains.

41 questions
4 domains
Foundation level

Question index

Jump straight to any question. Answers and explanations are inline.

Developer Fundamentals

11 questions in this domain

  1. Question 1Single Choice

    What type of cloud architecture is the Salesforce platform built on?

    • APeer-to-peer cloud architecture
    • BMulti-tenant cloud architectureCorrect answer
    • CSingle-tenant dedicated infrastructure
    • DClient-server architecture with isolated resources

    Why this is the answer

    Salesforce is built on a multi-tenant architecture where compute, storage, and application resources are shared securely among customers while data is logically isolated.

  2. Question 2Multiple Select

    Which of the following are true about Lightning Experience? Select all that apply.

    • AIt is built natively on the Salesforce Lightning Design System (SLDS)Correct answer
    • BIt requires all customizations to be written in Apex
    • CIt is a component-based user interface framework using LWC and AuraCorrect answer
    • DIt replaced Salesforce Classic as the modern user interfaceCorrect answer

    Why this is the answer

    Lightning Experience is a modern, component-based UI framework built on LWC and Aura, uses SLDS, and replaced Salesforce Classic.

  3. Question 3Interactive

    Examine the Apex trigger in the code block. What is the main problem with this implementation?

    • ASOQL query is executed inside a for loopCorrect answer
    • BThe trigger is missing a try-catch block
    • CNo sharing keyword is used
    • DThe variable 'contacts' is undeclared

    Why this is the answer

    The SOQL query inside the for loop can exhaust the 100-query limit when many records are processed.

  4. Question 4Single Choice

    What is the maximum number of SOQL queries allowed in a single synchronous transaction?

    • A50
    • B100Correct answer
    • C150
    • D200

    Why this is the answer

    Salesforce enforces a maximum of 100 SOQL queries per synchronous transaction.

  5. Question 5Multiple Select

    Which statements about master-detail relationships are correct? Select all that apply.

    • AChild records inherit security and sharing from the parent recordCorrect answer
    • BDeleting a parent record automatically deletes its child recordsCorrect answer
    • CRoll-up summary fields can be created on the parent objectCorrect answer
    • DChild records keep an owner independent from the parent record

    Why this is the answer

    Master-detail relationships cascade deletes, inherit sharing and ownership from the parent, and allow roll-up summary fields on the parent.

  6. Question 6Interactive

    Review the validation rule formula in the code block. What business rule does it enforce?

    • ARegion is required whenever Status is ActiveCorrect answer
    • BStatus must be Active before Region can be entered
    • COnly Active records may have a Region
    • DActive records must always have an empty Region

    Why this is the answer

    The formula returns true when Status is Active and Region is blank, so the validation rule blocks saves in that situation.

  7. Question 7Single Choice

    What is the purpose of Organization-Wide Defaults (OWDs)?

    • AThey grant additional record access based on criteria
    • BThey set the baseline record access for users who do not own a recordCorrect answer
    • CThey provide ad-hoc sharing for individual records
    • DThey define field-level security for profiles

    Why this is the answer

    Organization-Wide Defaults establish the most restrictive baseline level of record access for users who do not own a record.

  8. Question 8Multiple Select

    Which statements about sharing rules are true? Select all that apply.

    • ASharing rules can restrict access below the OWD baseline
    • BSharing rules can be based on record ownership or criteriaCorrect answer
    • CSharing rules are additive and cannot restrict access further than OWDCorrect answer
    • DSharing rules can grant additional access to groups of usersCorrect answer

    Why this is the answer

    Sharing rules only extend access beyond OWD baselines and can be ownership-based or criteria-based.

  9. Question 9Interactive

    Review the Apex class in the code block. Which keyword should be added to enforce the current user's record-level security?

    • Awith sharingCorrect answer
    • Bwithout sharing
    • Cstatic
    • Dglobal

    Why this is the answer

    Declaring an Apex class with 'with sharing' enforces the current user's profile, role hierarchy, and sharing rules.

  10. Question 10Single Choice

    What does the 'with sharing' keyword do in Apex?

    • AIt bypasses all record-level security
    • BIt enforces the current user's profile, role hierarchy, and sharing rulesCorrect answer
    • CIt grants system administrator access to all records
    • DIt prevents all DML operations in the class

    Why this is the answer

    The 'with sharing' keyword ensures that record-level security, including sharing rules and role hierarchy, is applied to SOQL and DML.

  11. Question 11Multiple Select

    Which of the following are valid Salesforce governor limits? Select all that apply.

    • AUnlimited SOQL queries in a synchronous transaction
    • B150 DML statements per synchronous transactionCorrect answer
    • C100 SOQL queries per synchronous transactionCorrect answer
    • D20 SOSL queries per synchronous transactionCorrect answer

    Why this is the answer

    Synchronous transactions allow up to 100 SOQL queries, 150 DML statements, and 20 SOSL queries.

Process Automation and Logic

12 questions in this domain

  1. Question 12Single Choice

    What is the primary purpose of the Trigger Handler pattern in Apex, and why do developers use it?

    • ATo delegate execution to a dedicated handler classCorrect answer
    • BTo write all logic inline inside the trigger body
    • CTo create multiple triggers per object
    • DTo replace Flow and Process Builder entirely

    Why this is the answer

    The Trigger Handler pattern moves business logic out of the trigger body into a dedicated handler class, improving testability, maintainability, and execution control.

  2. Question 13Multiple Select

    Which two statements correctly describe Apex interfaces and their role in maintainable business logic in Salesforce applications?

    • AInterfaces define method signatures without implementationCorrect answer
    • BInterfaces enable polymorphic behavior across classesCorrect answer
    • CInterfaces can contain concrete method bodies
    • DInterfaces can be instantiated directly

    Why this is the answer

    Interfaces define contracts of method signatures without implementation and enable polymorphic, decoupled design. They cannot be instantiated or contain concrete method bodies.

  3. Question 14Interactive

    What architectural pattern is demonstrated by the Apex trigger and handler class code block below?

    • ATrigger Handler patternCorrect answer
    • BSingleton pattern
    • CStrategy pattern
    • DFactory pattern

    Why this is the answer

    The trigger delegates its after-insert logic to AccountHandler, which is the core of the Trigger Handler pattern.

  4. Question 15Single Choice

    What does bulkification in Apex require developers to do when processing records in triggers, and why is it important?

    • AProcess collections of records instead of single recordsCorrect answer
    • BAlways use one DML statement per record
    • CAvoid using collections in triggers
    • DWrite a separate trigger for each record type

    Why this is the answer

    Bulkification requires processing collections of records together to avoid hitting Salesforce governor limits during large data operations.

  5. Question 16Multiple Select

    Which two items are valid Apex trigger context variables used to evaluate record state during execution?

    • ATrigger.newCorrect answer
    • BTrigger.isExecutingCorrect answer
    • CTrigger.query
    • DTrigger.result

    Why this is the answer

    Trigger.new and Trigger.isExecuting are valid context variables. Trigger.query and Trigger.result are not part of the Apex trigger context.

  6. Question 17Interactive

    What does the Apex code block below define as an Apex programming construct for business logic?

    • AAn interfaceCorrect answer
    • BA concrete class
    • CAn abstract class
    • DA trigger

    Why this is the answer

    The code defines an interface with an abstract method signature and no implementation, enabling polymorphic behavior.

  7. Question 18Single Choice

    What is a common drawback of putting complex business logic directly inside a trigger body in Salesforce?

    • AIt prevents code reuse and makes testing difficultCorrect answer
    • BIt guarantees better execution order across triggers
    • CIt automatically bulkifies all DML operations
    • DIt eliminates the need for handler classes

    Why this is the answer

    Inline logic prevents reuse and hampers testing. The Trigger Handler pattern avoids this by separating business logic into dedicated classes.

  8. Question 19Multiple Select

    Which two practices are recommended when designing a trigger framework for multiple trigger events and bulk records?

    • AUse a single trigger per sObjectCorrect answer
    • BDelegate execution to handler classesCorrect answer
    • CCreate multiple triggers per object to control order
    • DPlace SOQL queries directly inside for loops

    Why this is the answer

    A trigger framework uses one trigger per object and delegates logic to handler classes, ensuring orderly, maintainable, and bulkified execution.

  9. Question 20Interactive

    Why is the Apex code in the block below considered a violation of bulkification best practices?

    • AIt performs DML inside a loopCorrect answer
    • BIt uses Trigger.new instead of Trigger.old
    • CIt lacks the @future annotation
    • DIt queries inside a loop

    Why this is the answer

    Performing DML inside a for loop is a bulkification violation. DML must be performed once on a collection outside the loop.

  10. Question 21Single Choice

    Which declarative automation tool is the modern replacement for Workflow Rules and Process Builder in Salesforce?

    • AFlowCorrect answer
    • BApex Triggers
    • CApproval Processes
    • DEmail Alerts

    Why this is the answer

    Flow is Salesforce's unified declarative automation tool and is the designated successor to Workflow Rules and Process Builder.

  11. Question 22Multiple Select

    Which two statements about Before-Save and After-Save Record-Triggered Flow contexts are true in Salesforce automation?

    • ABefore-save flows can update the same recordCorrect answer
    • BAfter-save flows have access to the record IDCorrect answer
    • CBefore-save flows can access related records
    • DAfter-save flows cannot update other objects

    Why this is the answer

    Before-save flows update the same record efficiently, while after-save flows have record IDs and can access related records for cross-object DML.

  12. Question 23Interactive

    Why does the Apex method in this code block fail to compile when used as a future method?

    • A@future methods cannot accept sObject parametersCorrect answer
    • B@future methods must return a value
    • C@future methods must be instance methods
    • D@future methods must use the Queueable interface

    Why this is the answer

    Future methods only accept primitive data types, collections of primitives, or collections of IDs; passing an sObject causes a compilation error.

Testing, Debugging, and Deployment

8 questions in this domain

  1. Question 24Single Choice

    What is the minimum Apex code coverage percentage required by Salesforce before a deployment to production can succeed?

    • A75%Correct answer
    • B100%
    • C50%
    • D85%

    Why this is the answer

    Salesforce requires at least 75% aggregate coverage of all Apex code before deployment. Every trigger must also have coverage.

  2. Question 25Multiple Select

    Which of the following are valid System.assert methods used in Apex unit tests? Select all that apply.

    • ASystem.assertEquals()Correct answer
    • BSystem.assertNotEquals()Correct answer
    • CSystem.assert()Correct answer
    • DSystem.debug()

    Why this is the answer

    Apex tests validate expected outcomes with System.assertEquals(), System.assertNotEquals(), and System.assert(). System.debug() writes logs rather than making assertions.

  3. Question 26Interactive

    Review the Apex test method below. What is the primary purpose of the two calls that surround the update operation?

    • AReset governor limits for the core test transactionCorrect answer
    • BInsert test data more quickly
    • CGenerate a debug log
    • DIncrease code coverage

    Why this is the answer

    Test.startTest() and Test.stopTest() reset governor limits for the tested transaction and isolate asynchronous operations so bulk behavior is measured accurately.

  4. Question 27Single Choice

    Which Developer Console feature allows a developer to group and execute multiple Apex test classes together?

    • ATest SuiteCorrect answer
    • BTrace Flag
    • CQuery Editor
    • DExecution Overview

    Why this is the answer

    Test suites group related Apex test classes and can be executed together in the Developer Console to validate functional areas.

  5. Question 28Multiple Select

    Which statements about Salesforce code coverage are true? Select all that apply.

    • AIt is measured across all non-test Apex code in the organization.Correct answer
    • BEvery Apex trigger must have some test coverage to be deployed.Correct answer
    • CThe Developer Console shows line-by-line coverage information.Correct answer
    • DEvery class must individually meet the 75% requirement.

    Why this is the answer

    Coverage is calculated across all non-test Apex code; each trigger needs coverage, and the Developer Console shows line-by-line coverage. It is not per-class.

  6. Question 29Interactive

    Examine the Apex code below. What is the primary effect of the second line?

    • AAdds a diagnostic message to the debug logCorrect answer
    • BUpdates the Account record in the database
    • CIncreases the organization's Apex code coverage
    • DRaises the governor limit for SOQL queries

    Why this is the answer

    System.debug() writes diagnostic runtime information to the debug log. It does not modify data, coverage, or governor limits.

  7. Question 30Single Choice

    Which deployment mechanism is declarative and moves metadata between directly connected Salesforce orgs?

    • AChange SetsCorrect answer
    • BSalesforce CLI
    • CMetadata API
    • Dpackage.xml

    Why this is the answer

    Change sets are declarative and move metadata between directly connected orgs. CLI and Metadata API are programmatic alternatives.

  8. Question 31Multiple Select

    Which statements about source format and Metadata API format are correct? Select all that apply.

    • ASource format stores metadata in granular files suited for version control.Correct answer
    • BMetadata API deployments commonly use a package.xml manifest.Correct answer
    • CSource format cannot be tracked in a Git repository.
    • Dpackage.xml defines which metadata types and components are deployed.Correct answer

    Why this is the answer

    Source format uses individual files suited for Git. Metadata API uses package.xml to define deployment components, so it can be tracked in version control.

User Interface

10 questions in this domain

  1. Question 32Single Choice

    What is Lightning App Builder primarily used for?

    • APoint-and-click UI creationCorrect answer
    • BWriting custom Apex code
    • CManaging data backups
    • DCreating email templates

    Why this is the answer

    Lightning App Builder is a point-and-click tool for assembling custom user interfaces for Lightning Experience and mobile applications.

  2. Question 33Multiple Select

    Which component types can be added to a Lightning record page using Lightning App Builder? Select all that apply.

    • ALightning Web ComponentsCorrect answer
    • BAura componentsCorrect answer
    • CStandard componentsCorrect answer
    • DApex trigger classes

    Why this is the answer

    Lightning App Builder allows developers to assemble standard components, custom Lightning Web Components, and Aura components onto pages.

  3. Question 34Interactive

    A developer adds a custom component to an Opportunity Lightning Record Page. Looking at the placeholder metadata snippet, what declarative configuration should be used to show the component only when Stage equals Negotiation?

    • AComponent visibility filtersCorrect answer
    • BCustom JavaScript condition
    • CApex controller override
    • DPage layout assignment rule

    Why this is the answer

    Component visibility filters in Lightning App Builder conditionally show components based on field values without requiring custom code.

  4. Question 35Single Choice

    What is the underlying metadata architecture for customizable page layouts in Lightning App Builder?

    • AFlexiPageCorrect answer
    • BCompact Layout
    • CPage Layout
    • DRecord Type

    Why this is the answer

    FlexiPages are the metadata architecture used by Lightning App Builder for customizable page layouts and can be deployed via Metadata API.

  5. Question 36Multiple Select

    Which criteria can dynamic component visibility filters use in Lightning App Builder? Select all that apply.

    • ARecord field valuesCorrect answer
    • BDevice typeCorrect answer
    • CUser permissionsCorrect answer
    • DBrowser history

    Why this is the answer

    Visibility filters can evaluate record fields, device type, and user permissions to show or hide components dynamically.

  6. Question 37Interactive

    This configuration file defines a Lightning Web Component's metadata. What does the target declaration allow the component to do?

    • ABe placed on a Lightning record pageCorrect answer
    • BRun as a batch Apex job
    • CBe used only inside Visualforce
    • DAutomatically create a custom object

    Why this is the answer

    The target lightning__RecordPage exposes the component as an available option for Lightning record page customization.

  7. Question 38Single Choice

    Which decorator exposes a JavaScript property as a public property in a Lightning Web Component?

    • A@apiCorrect answer
    • B@track
    • C@wire
    • D@salesforce

    Why this is the answer

    The @api decorator marks a property as public, allowing parent components to pass values into the LWC.

  8. Question 39Multiple Select

    Which files are part of a Lightning Web Component bundle? Select all that apply.

    • A.html templateCorrect answer
    • B.js classCorrect answer
    • C.js-meta.xml configurationCorrect answer
    • D.controller.js file

    Why this is the answer

    An LWC bundle contains an HTML template, a JavaScript class, and a JavaScript metadata configuration file, plus optional resources such as CSS.

  9. Question 40Interactive

    In the JavaScript class snippet, what is the purpose of the @api recordId property?

    • AAllows a parent component to pass a record IDCorrect answer
    • BCreates a server-side Apex method
    • CStores data in local storage
    • DDefines a CSS style hook

    Why this is the answer

    The @api decorator exposes recordId as a public property, enabling parent-to-child data flow in LWC.

  10. Question 41Single Choice

    Which expression correctly references a controller action in Aura markup?

    • A{!c.handleClick}Correct answer
    • B{!v.handleClick}
    • C{#c.handleClick}
    • D{!controller.handleClick}

    Why this is the answer

    In Aura, the value provider c is used to reference controller actions in markup expressions.

Frequently asked questions

Everything about the Salesforce Certified Platform Developer I question bank and how to use it.