Salesforce DEX-450 Exam Questions & Answers (November 2026)
Build Applications Programmatically on the Salesforce Platform exam questions with 26 free practice questions and explained answers. Updated November 25, 2026. · See all Salesforce exams
Answer 26 scenario questions on this page and see your score as you go. No sign-up needed.
Exam Details
- Exam Code
- DEX-450
- Vendor
- Salesforce
- Question Types
- Single ChoiceMultiple Choice
- Official Page
- View Exam Page
Apex Coding
Apex coding covers the language features used to write logic on the Salesforce platform, including sObjects, primitive data types, and control statements. Candidates must write valid Apex and recognize how repeated work can affect governor limits.
A service receives an optional text value named sourceCode from a user-maintained setting. The value can be null, empty, or contain only spaces. Before passing it to a parser, the service must determine whether it is non-null and contains non-whitespace text, without causing a null dereference.
A service receives an optional text value named sourceCode from a user-maintained setting. The value can be null, empty, or contain only spaces. Before passing it to a parser, the service must determine whether it is non-null and contains non-whitespace text, without causing a null dereference. Which Apex condition meets these requirements?
Show Answer
Correct Answer
A
Option A first checks that sourceCode is not null, then uses short-circuit evaluation before calling trim, and rejects empty or whitespace-only text. Option B calls trim before checking for null. Option C can evaluate trim when the value is null because its first condition is false. Option D attempts trim when the value is null.
A synchronous Apex operation processes 2,000 in-memory entries and must return its result to the caller immediately. For each entry, the code scans a second list for a matching identifier and recalculates a value derived from configuration that never changes during the operation. The operation is nearing its CPU limit, and database access is not involved.
Choose two changes that best reduce the repeated work while keeping the result synchronous.
Select 2 answers, then check them.
Show Answer
Correct Answer
A, C
Options A and C reduce repeated calculations and replace repeated list scans, which directly cuts work in the synchronous loop. Option B conflicts with the required synchronous result and does not remove governor limits. Option D cannot reliably continue after a governor limit exception. Option E is not available because an administrator cannot raise this per-invocation CPU limit.
Org Data Retrieval Using SOQL & SOSL
This topic covers retrieving Salesforce records with SOQL and searching across objects with SOSL. Candidates must select suitable query forms, navigate object relationships, and handle static and run-time queries and their results.
A service team is building a report of Contacts associated with customer Accounts. The report must show each Contact's last name alongside the parent Account's name and industry. The team needs one query that returns Contact records as the main results, and it does not need Accounts that have no related Contacts.
Which SOQL query returns the required records?
Show Answer
Correct Answer
A
Option A is correct because the requested records are Contacts, and Account.Name and Account.Industry traverse each Contact's parent relationship. Option B is not correct because the Account subquery is in the wrong relationship direction. Option C is not correct because it returns Accounts as the root records rather than the required Contacts. Option D is not correct because it omits Account.Industry, which the report must display.
A support team receives a short customer name from an email and needs to find matching records before opening a case. The name could belong to an Account or a Contact, and the team wants names from either object that contain the supplied search term. The search should return the email field for any matching Contacts as well.
Which search should the developer use?
Show Answer
Correct Answer
A
Option A is correct because SOSL searches name fields across both requested object types and returns Account and Contact results in separate groups. Option B searches only Accounts, while Option C searches only Contacts, so neither covers both record types. Option D also searches only Accounts and requires an exact name match instead of searching for the term across both types.
A sales operations team is creating an internal screen that queries Accounts. Users may choose one of several approved fields to include in the results and enter an Industry value to filter the records. Both inputs are supplied at run time. The implementation must build the query dynamically without allowing an unapproved field or unsafe filter value to change its meaning.
A screen lets users choose an Account field to display and enter an Industry value for filtering. The field choice must be limited to approved fields, and the entered value must be handled safely in a dynamic query. Which two implementation steps should the developer use? Choose two.
Select 2 answers, then check them.
Show Answer
Correct Answer
A, B
Options A and B are correct because the selected identifier must be restricted to approved fields, while the Industry value can be bound in the dynamic query. Option C is not correct because internal input can still contain quote characters that alter the query. Option D is not correct because bind variables cannot substitute field identifiers. Option E is not correct because escaping the value does not validate the field name and avoids the safer bind approach.
Org Data Manipulation Using DML
This topic covers Apex data manipulation language operations and the methods used to invoke them. Candidates must choose suitable DML behavior for a business requirement and handle failures by using exceptions or per-record results.
A service desk tool submits a list of new Equipment_Request__c records as one business operation. The service owner requires either every request to be saved or none of them, and the tool must display a useful message if a validation rule rejects any request.
A service desk tool submits a list of new Equipment_Request__c records as one business operation. The service owner requires either every request to be saved or none of them, and the tool must display a useful message if a validation rule rejects any request. Which implementation best meets these requirements?
Show Answer
Correct Answer
A
Option A is correct because the insert statement is all-or-none, and catching DmlException lets the tool report a rejected batch without saving part of it. Option B is not correct because false permits partial success. Option C is not correct because earlier individual inserts can remain successful. Option D is not correct because partial success is allowed and checking one result does not validate the whole batch.
A warehouse integration receives Account records with a populated Legacy_Key__c external ID field. Some keys already exist and must update those Accounts, while new keys must create Accounts. The integration must continue processing valid records when another record fails validation, and it must report the result for each input record.
A warehouse integration receives Account records with a populated Legacy_Key__c external ID field. Some keys already exist and must update those Accounts, while new keys must create Accounts. The integration must continue processing valid records when another record fails validation, and it must report the result for each input record. Choose two statements that correctly describe the implementation.
Select 2 answers, then check them.
Show Answer
Correct Answer
A, C
Options A and C are correct because the external ID token selects the matching field, false allows partial success, and each UpsertResult exposes its outcome and errors. Option B is not correct because plain upsert uses record IDs for matching. Option D is not correct because false permits successful rows to proceed. Option E is not correct because results are available for partial outcomes. Option F is not correct because upsert can create unmatched records.
Deployment
Deployment covers moving Salesforce changes between orgs and managing releases with tools such as change sets, packages, Salesforce DX, and DevOps Center. Candidates must choose an approach that fits the org setup and release requirements, then identify the correct steps for that approach.
A release manager must move a tested flow and its custom field from a development sandbox to the production org. Both orgs belong to the same Salesforce production environment, and the metadata is supported by change sets. Production has not previously received a change set from this sandbox, and the release must use the existing change set process.
Which action should the release manager take before sending the changes?
Show Answer
Correct Answer
B
Option B is correct because production must allow inbound change sets from the development sandbox before that sandbox can upload one for deployment. Option A reverses the source and target. Option C is not correct because change sets can move supported metadata between related sandbox and production orgs. Option D uses the inbound change set in the wrong org.
A platform team maintains an internal application in a Salesforce DX project with a dedicated package directory. The team wants repeatable releases, source control, and the ability to install a numbered release in a test org before production. The application is not being distributed as a commercial product, and the team plans to keep its source project as the development record.
Choose two actions that fit this release approach.
Select 2 answers, then check them.
Show Answer
Correct Answer
A, D
Options A and D are correct because the Salesforce DX project identifies the package directory, and a package version can be created from that source and installed in the test org. Option B is not correct because the package is defined through project configuration. Options C and E describe requirements that do not apply. Option F confuses change sets with package version creation.
A Salesforce team has a Git repository and three connected orgs for development, testing, and production. Administrators and developers need to associate changes with work items, review them in source control, and promote them through the environments in order. The team wants a Salesforce-supported release workflow and does not want its repository or change history replaced.
Which approach best fits the stated release process?
Show Answer
Correct Answer
A
Option A is correct because DevOps Center organizes work items and supports promoting changes through pipeline environments while working with source control. Option B is not correct because an unmanaged package is not the source-control repository. Option C is not correct because DevOps Center does not require change sets. Option D is not correct because DevOps Center works with, rather than replaces, a Git repository.
Apex Trigger Essentials
This topic covers Apex trigger declarations, trigger events, and context variables. Candidates must identify valid trigger syntax and select the context data available for a given event.
A sales operations team receives Account records from both a user interface and a nightly integration. Before each new Account is saved, and before each existing Account is updated, the team must normalize a text field on that same record. The change must run at the required times without relying on a particular data-entry channel.
Which trigger declaration meets the requirement?
Show Answer
Correct Answer
A
Option A is correct because its declaration runs before both inserts and updates, allowing the trigger to normalize fields on the records being saved. Option B uses invalid event syntax. Option C runs after updates, too late for the required normalization before the update is saved. Option D uses an event that is not valid in an Apex trigger declaration.
A support team uses an after update trigger on Case to prepare an audit summary for records changed by either agents or an API integration. The summary service accepts two maps keyed by record ID, one containing the values after the update and one containing the values before it. The trigger must supply those maps directly from its context.
Choose two. Which context variables provide the required maps?
Select 2 answers, then check them.
Show Answer
Correct Answer
A, B
Trigger.newMap and Trigger.oldMap are correct because an after update trigger can use them to access the current and prior Account records by ID. Option C is a list of current records, not a map. Option D is a Boolean that identifies the update context. Option E is a list of prior records, not a map.
Apex Class Essentials
Apex classes organize server-side logic and can be used for reusable services and actions called by other Salesforce features. Candidates must identify common class uses, understand how sharing declarations affect record access, and select annotations for supported Apex integrations.
A service team is replacing a manual process with a Flow that sends a collection of work requests to Apex. Flow users must be able to provide values for each request field, and the Apex action must return results that the Flow can use in later steps. The team wants to expose the action without creating a user interface component.
Choose two. A service team is building an Apex action for a Flow that processes a collection of work requests. Each request has input fields that the Flow must populate, and the action must return results to the Flow. Which two annotations meet these requirements?
Select 2 answers, then check them.
Show Answer
Correct Answer
B, C
@InvocableMethod exposes the Apex method as an action that Flow can call, and @InvocableVariable makes request fields available as Flow inputs or outputs. Option A is not correct because @AuraEnabled supports access from Lightning components, not Flow actions. Option D is for test visibility. Option E supports Visualforce remoting, and Option F controls access across namespaces.
A customer support application uses one Apex service from a Flow and a Lightning component. The security team requires the service to respect each user's record-level sharing access. The service may later be called from another entry point whose sharing context is unknown, so the team needs the class declaration itself to enforce the policy rather than rely on its callers.
A customer support application calls an Apex service from several entry points, including a Flow and a Lightning component. Company policy requires the service to enforce record-level sharing for every caller, even if a future caller does not run in a sharing context. Which class declaration best meets this requirement?
Show Answer
Correct Answer
A
Declaring the class with sharing enforces record-level sharing regardless of the caller, which meets the stated policy. Option B is not correct because without sharing bypasses record-level sharing. Option C is not correct because inherited sharing depends on the calling context. Option D is not correct because global controls accessibility across namespaces, not record sharing.
Order of Execution, Apex Transactions, & Platform Events
This topic covers how Salesforce orders record processing, how Apex transaction outcomes affect database work, and how platform events behave across commits and rollbacks. Candidates must use these rules to predict execution results and select an event configuration that supports error logging.
A service team uses a before-save record-triggered flow on Case to set Priority to High when a customer is marked as an escalated account. A before trigger also reads Priority and writes a diagnostic value to a custom field. The team reports that the diagnostic value does not reflect the flow's change and wants to confirm the expected sequence for a Case update.
Which sequence correctly describes the order of these actions?
Show Answer
Correct Answer
B
Option B is correct because the before-save record-triggered flow runs before the before trigger, so the trigger can read the updated Priority value. Option A is not correct because the trigger does not run before that flow. Option C is not correct because validation rules run after the before trigger. Option D is not correct because validation rules do not run before the before trigger.
A synchronous Apex service catches an exception while processing a case, prepares a platform event containing an error summary, publishes it, and then rethrows the exception so that the case changes roll back. The event is currently configured as Publish After Commit, and an asynchronous subscriber writes received events to an external logging system. The team needs the error event to survive the rollback.
Which two changes will allow the error event to be published even though the service transaction is rolled back? Choose two.
Select 2 answers, then check them.
Show Answer
Correct Answer
A, B
Options A and B are correct because Publish Immediately does not wait for the transaction to commit, and the handler must publish before rethrowing the exception. Option C is not correct because a rolled-back transaction does not publish an After Commit event. Option D is not correct because the rethrown exception ends the path before that call. Option E is not correct because the result does not confirm subscriber processing.
A Lightning page calls a synchronous Apex service that updates two related records as part of one request. Both update operations complete without errors, but a later operation in the same service throws an exception that is not caught by the service or its caller. No savepoint is used, and the page displays the resulting request failure. The administrator asks which changes remain in the database.
What happens to the record changes when this request ends?
Show Answer
Correct Answer
B
Option B is correct because the uncaught exception ends the synchronous request and rolls back its database work, including the earlier updates. Option A is not correct because successful earlier updates do not commit independently within this transaction. Option C is not correct because the first update is part of the same transaction. Option D is not correct because the position of the exception after the updates does not cause them to commit.
Apex Testing
Apex testing covers the framework for running tests, creating isolated test data, and checking application behavior with assertions. Candidates must be able to structure tests that verify synchronous and asynchronous Apex behavior without depending on existing org records.
A team is adding tests for a request-processing service used by several internal applications. The service has a void submit method, and a persisted request in Draft status must be rejected with a specific custom exception before any update occurs. The test must confirm the rejection contract and must not depend on business records already present in the org.
A team maintains an Apex service with a void submit method. It must reject a persisted request in Draft status by throwing a RequestValidationException with the message "Request must be approved." The service performs this validation before any update. Which test approach reliably verifies this behavior?
Show Answer
Correct Answer
A
Option A is correct because it verifies both that the service throws and that the exception has the required message. Option B is not correct because the test can pass without an exception or with the wrong exception. Option C is not correct because an uncaught expected exception fails the test. Option D is not correct because org data is unreliable. Option E is not correct because the method returns no value.
A service method updates a request record and enqueues a Queueable job that writes a processing outcome to that record. The team needs a test that proves the queued work actually runs and produces the expected outcome. The test must create its own request record, avoid relying on existing org data, and verify the final stored value.
Choose two actions that will correctly test the Queueable work initiated by the service.
Select 2 answers, then check them.
Show Answer
Correct Answer
A, B
Options A and B are correct because the test starts its execution window before invoking the service, and checks the resulting record change after stopTest runs the queued work. Option C is not correct because the test should create its own records. Option D is not correct because the job is enqueued only after stopTest. Option E is not correct because it prevents the behavior from being tested. Option F is not correct because the asynchronous work has not completed yet.
Design Strategies for Efficient Apex Solutions
This topic covers strategies for designing Apex code and database operations that handle realistic workloads efficiently. Candidates must choose query and code structures that meet business requirements while respecting Salesforce platform limits.
A subscription company processes billing updates for up to 200 customers in one transaction. Its custom Customer_Ref__c field is an indexed external ID, and the incoming records contain the exact references to process. A developer finds that the current query filters on Status__c, which has only two possible values, then filters customer references in Apex. The query plan shows that this status filter is not selective.
Which query strategy best addresses the performance problem?
Show Answer
Correct Answer
C
Option C is correct because the supplied customer references match the indexed external ID, and the query plan confirms that this filter is selective for the required records. Option A is not correct because Status__c has low selectivity. Option B is not correct because one query per reference scales poorly. Option D is not correct because it transfers unrelated rows for Apex filtering.
A finance team needs quarterly totals by territory and product category from a custom transaction object that contains several million records. The report only covers a supplied quarter, and Transaction_Date__c is indexed. The Apex job needs the sum of Amount__c for each territory and category, but it does not need individual transaction details or any record-level calculations.
Choose two changes that best meet the reporting requirements.
Select 2 answers, then check them.
Show Answer
Correct Answer
A, D
Options A and D are correct because GROUP BY with SUM returns the requested territory and category totals, while the indexed quarter range limits the source records. Option B is not correct because loading detail rows consumes heap and row-processing capacity. Option C is not correct because per-territory queries multiply database calls. Option E is not correct because SOSL is for text search, not numeric aggregation.
Apex Trigger Design Strategies
This topic covers how to choose between declarative automation and Apex trigger logic, and how to combine them without duplicating behavior. Candidates must decide which responsibilities fit administrator-maintained Flow and which require structured Apex logic.
A distributor’s Opportunity trigger calculates renewal rebates using active contracts and related assets. The regional rebate thresholds change several times each year, but sales operations must maintain them without developer releases. The trigger also checks that a required approval reason is present for certain stages. The related-record calculation must remain in Apex, and the team wants to avoid maintaining duplicate checks.
Choose two. Which design decisions best meet the distributor’s requirements?
Select 2 answers, then check them.
Show Answer
Correct Answer
A, C
Options A and C meet the requirements by using a validation rule for required fields and Custom Metadata Type records for configurable thresholds, while retaining Apex for related-record calculations. Option B cannot represent the calculation described. Option D adds triggers instead of making rules administrator-maintainable. Option E misuses labels for structured policy data. Option F duplicates required-field checks and can produce conflicting behavior.
A facilities company creates Work Order records through several channels. Administrators need to change notification routing and simple follow-up field rules as its procedures evolve. A regulated compliance classification requires a complex calculation based on related records, and the existing Apex trigger performs that calculation. The company wants to reduce developer involvement in routine process changes without weakening review of the classification logic.
A facilities company creates Work Order records through several channels. Administrators need to change notification routing and simple follow-up field rules as its procedures evolve. A regulated compliance classification requires a complex calculation based on related records, and the existing Apex trigger performs that calculation. Which design best supports both requirements?
Show Answer
Correct Answer
A
Option A assigns changing, straightforward rules to Flow and retains the complex related-record calculation in Apex. Option B puts a complex calculation into Flow despite the stated requirement. Option C leaves routine routing changes dependent on developer releases. Option D duplicates the compliance logic, creating two implementations that can produce inconsistent classifications.
User Interface Development
Candidates build Lightning web components that retrieve and display record data, communicate through component events, and appear on Salesforce pages. They must choose component features and configuration that meet the needs of the interface and its users.
A service team is building a custom record panel for its case workspace. The panel must show a case subject and status, use the current record when a user navigates between cases, and share record data through Lightning Data Service. The team wants to avoid a separate Apex controller and display only the fields needed by its template.
Which approach best meets the requirements?
Show Answer
Correct Answer
A
Option A is correct because the reactive recordId lets the component receive updated record data as the user navigates, and getRecord uses Lightning Data Service. Option B is not correct because getObjectInfo returns object metadata, not record values. Option C is not correct because getRecord is a wire adapter, not an imperative function. Option D is not reactive when the recordId changes.
A sales application has a parent component that displays a list of accounts and a child component that renders selectable rows. The child has no access to the parent’s private state, and the parent must update a summary when a user selects a row. The team wants direct parent-child communication and does not want a global event mechanism.
Choose two. Which two implementation choices correctly let the parent receive the selected record identifier?
Select 2 answers, then check them.
Show Answer
Correct Answer
A, B
Options A and B are correct because the child sends its selection in a custom event, and the parent listens for that event and reads its detail. Option C is not correct because the listener attribute must use the lowercase event name. Option D is not correct because a child should communicate through an event rather than directly changing a private parent property. Option E is not correct because the identifier is sent in event.detail, not event.target.value.
A support organization wants administrators to add a custom status panel to Lightning record pages without deploying a separate Aura wrapper. The panel must receive the current record identifier when placed on a record page, and administrators must be able to select it in Lightning App Builder. The same component does not need to appear on app or home pages.
Which component setup satisfies the administrator’s requirements?
Show Answer
Correct Answer
A
Option A is correct because isExposed and the lightning__RecordPage target make the component available on record pages, while a public recordId property can receive the current record context. Option B exposes it only for app pages. Option C prevents it from being available in App Builder. Option D does not expose recordId for the platform to provide the record context.
Continue Your DEX-450 Preparation
You have seen 26 questions from a full set of 201. Prepare with the DEX-450 dumps PDF and the Web-Based Practice Test.
- Compatible with All Devices
- Printable Format
- No Download Limits
Practice Test
- Check your timing and weak areas
- No Practice Limits
- Regularly Updated
- 100% Money-Back Guarantee
- 90 Days Free Updates
- Instant Access
Frequently Asked Questions
Which DEX-450 topic tends to challenge candidates who know Apex syntax?
Predicting order of execution and transaction outcomes can be harder than recalling Apex syntax. You need to follow how record processing, database changes, rollbacks, and platform events interact, then determine what persists after an error. Platform event configuration for error logging adds another layer. Draw a simple sequence for a record update, note each operation and commit point, and test your reasoning against different failure points.
How does the exam test efficient Apex beyond basic coding?
The challenge is recognizing how code behaves across many records, not just whether one record works. Repeated queries or DML operations can consume governor limits, and trigger logic must account for bulk processing. The exam connects Apex structures with SOQL, DML, and business requirements. Practise rewriting a single-record approach to handle a collection, then identify which database work should occur outside repeated processing.
Why can deployment questions feel disconnected from Apex study?
Deployment asks you to choose among change sets, packages, Salesforce DX, and DevOps Center based on the org setup and release requirements. Knowing Apex does not automatically tell you which route fits or what steps follow. The Exam4Success PDF can help you review these tool distinctions away from an org or development environment. Make a comparison table that links each approach to its suitable context and required release steps.
What preparation mistakes make Apex testing difficult on DEX-450?
A common weakness is relying on records already present in an org or checking only that code runs without errors. DEX-450 covers isolated test data, assertions, and verification of synchronous and asynchronous behavior. The Practice Test can help identify gaps in test setup or result checks. For each scenario you review, note the data the test creates, the behavior it invokes, and the assertion that verifies the expected outcome.
What practical development skills does DEX-450 focus on?
The topics span server-side Apex and user-facing Lightning web components. You are expected to work with records, retrieve and manipulate data, structure reusable classes, and connect components with record data and component events. That combination is relevant to developers building Salesforce applications across the interface and platform logic. To see where your skills are strongest, map one simple feature from its Lightning page through its data retrieval and Apex behavior.
Can this exam help developers work more effectively with Salesforce administrators?
Its trigger design material addresses when declarative automation such as Flow is suitable and when structured Apex logic is needed. That distinction supports clearer discussions about ownership and reduces duplicated behavior between automation tools. The exam also covers how sharing declarations affect record access, which matters when application logic serves different users. Practise reviewing a sample business process and assigning each responsibility to Flow or Apex with a reason.
What should I study first if I am beginning DEX-450 preparation?
Start with the connected fundamentals of Apex, SOQL and SOSL, and DML. Those areas give you the vocabulary to understand triggers, classes, testing, and transaction behavior later. The Exam4Success PDF is suited to reviewing the topic relationships when you are away from a Salesforce org. Begin by writing a small Apex example, then identify its record types, query approach, data operation, and possible limit concerns.
How can I tell if I am ready for the scenario-based parts of this exam?
Check whether you can explain why one approach fits a requirement, rather than only recall a definition. Try selecting a query form, a DML behavior, a trigger context variable, or a deployment method from a short business scenario. The Practice Test can help you identify topics where your choices are inconsistent or slow. After each attempt, record the rule behind any missed answer and revisit that topic before trying a new set.
How should I plan study time when my experience is uneven across the topics?
Use a topic check to separate familiar areas from those needing hands-on practice. A developer comfortable with Apex may still need work on Lightning web component configuration, platform events, asynchronous tests, or release approaches. Avoid allocating equal time by default. Review each topic in turn, rate your confidence, and spend the next study session on the weakest area by building or tracing a small example.
Exam4Success is an independent exam preparation provider and is not affiliated with or endorsed by Salesforce.