| Exam Code | CRT-450 |
| Exam Name | Salesforce Certification Preparation for Platform Developer I |
| Vendor | Salesforce |
| Total Questions | 201 |
| Last Updated | 26-Oct, 2026 |
- Latest & Verified Questions
- Detailed Explanations
- Regular Updates
- Full-Length Practice Tests
- Boost Your Exam Confidence
PDF Study Materials
Downloadable guides and resources
Practice Tests
Full-length tests with real exam experience
Progress Tracking
Monitor your performance and improvement
Study Anywhere
Access on desktop, tablet, and mobile
Free CRT-450 Practice Questions
Explore 16 free practice questions for the Salesforce CRT-450 exam and review the answers and explanations to support your preparation.
-
Question 1
Single answerA developer has an integer variable called maxAttempts. The developer needs to ensure
that once maxAttempts is initialized, it preserves its value for the length of the Apex
transaction; while being able to share the variable's state between trigger executions.
How should the developer declare maxAttempts to meet these requirements?-
Option A:Correct
Declare maxattempts as a constant using the static and final keywords.
-
Option B:Correct
Declare maxattempts as a member variable on the trigger definition.
-
Option C:Correct
Declare maxattempts as a variable on a helper class.
-
Option D:Correct
Declare maxAttempts as a private static variable on a helper class
Show Answer & Explanation Hide Answer & Explanation
Correct Answer: A
Explanation
D. Declare
maxAttemptsas a private static variable on a helper class. Astaticvariable in Apex is initialized only once per transaction and its value is shared across all trigger executions within that same transaction, making it ideal for preserving state and controlling behavior such as recursion or retry limits. By placingmaxAttemptsin a helper class as a private static variable, the developer ensures that the value remains available and unchanged throughout the transaction while being accessible to all trigger invocations. For example:
public class TriggerHelper {
private static Integer maxAttempts = 5;
public static Integer getMaxAttempts() {
return maxAttempts;
}
}
This approach satisfies both requirements: maintaining the value for the duration of the Apex transaction and sharing the variable's state between trigger executions. -
-
Question 2
Multiple answersniversal Containers recently transitioned from Classic to Lightning Experience.
One of its business processes requires certain values from the Opportunity object to be sent via an
HTTP REST callout to its external order management system when the user presses a custom button
on the Opportunity detail page. Example values are as follows:
* Name
*Amount
* Account
Which two methods should the developer implement to fulfill the business requirement?
Choose 2 answers-
Option A:Correct
Create a custom Visualforce quick action that performs the HTTP REST callout, and use a
Visualforce quick action to expose the component on the Opportunity detail page.
-
Option B:Correct
Create a Remote Action on the Opportunity object that executes an Apex immediate action to
perform the HTTP REST callout whenever the Opportunity is updated. -
Option C:Correct
Create a Lightning component quick action that performs the HTTP REST callout, and use a
Lightning Action to expose the component on the Opportunity detail page. -
Option D:Correct
Create an after update trigger on the Opportunity object that calls a helper method using @future
(Callout=true) to perform the HTTP REST callout.
Show Answer & Explanation Hide Answer & Explanation
Correct Answer: A, C
Explanation
Explanation: The requirement states that the HTTP REST callout should occur when the user presses a custom button on the Opportunity detail page. In Lightning Experience, this is typically implemented using a Quick Action. A Visualforce Quick Action (A) can execute Apex code that performs the callout and can be exposed on the Opportunity record page. Similarly, a Lightning Component Quick Action (C) can invoke Apex to perform the HTTP REST callout and is the preferred Lightning Experience solution. Both approaches are user-initiated and execute only when the button is clicked.
Why not B? A Remote Action is a Visualforce concept and an Apex Immediate Action is used in automation tools, not for a user-clicked custom button on an Opportunity page.
Why not D? An after-update trigger with@future(callout=true)executes whenever the Opportunity is updated, not specifically when the user clicks the custom button. This does not satisfy the requirement of triggering the callout directly from the button press. -
-
Question 3
Single answerA developer is asked to write helper methods that create test data for unit tests.

What should be changed in the Testutils class so that its methods are only usable by unit test
methods?

-
Option A:Correct
@isTest above line 03.
-
Option B:Correct
Add @istest above line 01.
-
Option C:Correct
Change public to private on line 01.
-
Option D:Correct
Remove static from line 03.
Show Answer & Explanation Hide Answer & Explanation
Correct Answer: A
Explanation
To ensure that the methods in the
TestUtilsclass are only available to unit test code, the entire class should be marked with the@isTestannotation by adding it above line 01. In Apex, classes annotated with@isTestare excluded from the organization's code size limit and can only be referenced by test methods, making them ideal for utility classes that create test data or provide helper functionality for tests. Placing@isTestabove thecreateAccount()method (Option A) would be invalid because the annotation applies to classes or test methods, not helper methods like this one. Changing the class toprivate(Option C) would only restrict visibility within the same class and would not make it test-only. Removingstaticfrom the method (Option D) would simply require an instance of the class to call the method and would not restrict its usage to test code. Therefore, the best solution is to annotate the entire class with -
-
Question 4
Single answerA developer is creating a Lightning web component to show a list of sales records.
The Sales Representative user should be able to see the commission field on each record. The Sales
Assistant user should be able to see all fields on the record except the commission field.
How should this be enforced so that the component works for both users without showing any
errors?-
Option A:Correct
Use WITH SECURITY_ENFORCED In the SOQL that fetches the data for the component,
-
Option B:Correct
Use Security.stripInaccessible Le to remove fields inaccessible to the current user.
-
Option C:Correct
Use Lightning Locker Service to enforce sharing rules and field-level security.
-
Option D:Correct
Use Lightning Data Service to get the collection of sales records.
Show Answer & Explanation Hide Answer & Explanation
Correct Answer: B
Explanation
The requirement is that both users should be able to see the records, but the Sales Assistant should not see the Commission field, and the component should work without generating errors. The Apex method that retrieves the records should use
Security.stripInaccessible()to automatically remove fields that the current user does not have permission to access before returning the data to the Lightning Web Component. This ensures that Sales Representatives receive the Commission field while Sales Assistants do not, and no exceptions are thrown. Option A (WITH SECURITY_ENFORCED) would throw a runtime exception if the query includes a field the user cannot access, causing errors rather than gracefully hiding the field. Option C is incorrect because Lightning Locker Service provides client-side security isolation, not field-level security enforcement. Option D (Lightning Data Service) respects CRUD and FLS but does not provide the same server-side filtering control needed when retrieving collections through Apex. Therefore,Security.stripInaccessible()is the best solution for enforcing field-level security while avoiding errors.
List<Sales__c> salesRecords = [
SELECT Name, Amount__c, Commission__c
FROM Sales__c
];
SObjectAccessDecision decision =
Security.stripInaccessible(
AccessType.READABLE,
salesRecords
);
return decision.getRecords(); -
-
Question 5
Multiple answersWhich three Salesforce resources can be accessed from a Lightning web component?
Choose 3 answers-
Option A:Correct
Static resources
-
Option B:Correct
All external libraries
-
Option C:Correct
SVG resources
-
Option D:Correct
Third-party web components
-
Option E:Correct
Content asset files
Show Answer & Explanation Hide Answer & Explanation
Correct Answer: A, C, E
-
-
Question 6
Single answerA developer is tasked with building a custom Lightning web component to collect
Contact information. The form will be shared among many different types of users
in the org. There are security requirements that only certain fields should be edited
and viewed by certain groups of users. What should the developer use in their
Lightning Web Component to support the security requirements?-
Option A:Correct
aura-input-failed
-
Option B:Correct
force-input-failed
-
Option C:Correct
ui-input-failed
-
Option D:Correct
lightning-input-failed
Show Answer & Explanation Hide Answer & Explanation
Correct Answer: B
Explanation
When building a Lightning Web Component that must respect different users' field-level security (FLS) and permissions, the developer should use
lightning-input-fieldwithin alightning-record-edit-form. Thelightning-input-fieldcomponent automatically enforces Salesforce security settings, including field-level security, required fields, and page layout permissions. As a result, users only see and edit the fields they are authorized to access, without requiring the developer to write custom security logic. The other options (aura-input-failed,force-input-failed,ui-input-failed) are not valid Lightning components for handling field security. Therefore,lightning-input-fieldis the recommended solution for creating secure, reusable forms that work correctly for different user groups. -
-
Question 7
Multiple answersWhat are two benefits of using declarative customizations over code?
Choose 2 answer-
Option A:Correct
Declarative customizations automatically update with each Salesforce release.
-
Option B:Correct
Declarative customizations automatically generate test classes.
-
Option C:Correct
Declarative customizations cannot generate run time errors
-
Option D:Correct
Declarative customizations generally require less maintenance
Show Answer & Explanation Hide Answer & Explanation
Correct Answer: A, D
Explanation
Declarative customizations are generally preferred over code when they can meet the business requirements because they are easier to maintain and are automatically updated to work with Salesforce platform enhancements and releases. Option A is correct because Salesforce ensures declarative features continue to function with new releases, reducing the need for manual updates. Option D is also correct because declarative solutions typically require less maintenance, less technical expertise, and can be modified more easily by administrators. Option B is incorrect because declarative customizations do not generate Apex test classes. Option C is incorrect because declarative tools can still produce runtime errors due to configuration issues, validation rules, data problems, or automation conflicts.
-
-
Question 8
Single answerA developer creates a batch Apex job to update a large number of records, and receives reports of
the job timing out and not completing.
What is the first step towards troubleshooting the issue?-
Option A:Correct
Check the asynchronous job monitoring page to view the job status and logs.
-
Option B:Correct
Check the debug logs for the batch job.
-
Option C:Correct
Disable the batch job and recreate it with a smaller number of records.
-
Option D:Correct
Decrease the batch size to reduce the load on the system.
Show Answer & Explanation Hide Answer & Explanation
Correct Answer: A
Explanation
When troubleshooting a Batch Apex job that is timing out or failing to complete, the first step is to review the job's status and execution details in Salesforce's Apex Jobs (Asynchronous Job Monitoring) page. This page provides information such as whether the job completed, failed, was aborted, how many batches were processed, and any error messages generated during execution. Once the job details are reviewed, the developer can then investigate debug logs or optimize the batch size if necessary. Options B, C, and D may be useful later in the troubleshooting process, but the initial step should always be to examine the job's status and error information through the asynchronous job monitoring tools.
-
-
Question 9
Multiple answersA developer created a Lightning web component called statuscomponent to be Inserted into the
Account record page.
Which two things should the developer do to make this component available?
Choose 2 answers-
Option A:Correct
Add <targer>lightning_Recordpage</target> to the statuscomponent. js file,
-
Option B:Correct
Add <target>lightning RecordPage</target> to the statusComp .js-meta.xml file.
-
Option C:Correct
Set isExposes to true In the statuscomponent.js-meta.xml file.
-
Option D:Correct
Add <mastertabel>Account </masterLabel> to the statusComponent. js-meta.xm1 file.
Show Answer & Explanation Hide Answer & Explanation
Correct Answer: B, D
Explanation
To make a Lightning Web Component available on an Account Record Page, the component's configuration file (
statusComponent.js-meta.xml) must specify where the component can be used and expose it to Lightning App Builder. Option B is correct because adding<target>lightning__RecordPage</target>inside the<targets>section makes the component available for record pages. Option C is also correct because<isExposed>true</isExposed>must be set to allow the component to appear in Lightning App Builder. Option A is incorrect because targets are defined in the.js-meta.xmlfile, not in the.jsfile. Option D is incorrect becausemasterLabelis not used to make an LWC available on a record page. -
-
Question 10
Multiple answersWhat are two use cases for executing Anonymous Apex code?
Choose 2 answers-
Option A:Correct
schedule an Apex class to run periodically
-
Option B:Correct
To delete 15,000 inactive Accounts in a single transaction after a deployment
-
Option C:Correct
To run a batch Apex class to update all Contacts
-
Option D:Correct
To add unit test code coverage to an org
Show Answer & Explanation Hide Answer & Explanation
Correct Answer: B, C
Explanation
Anonymous Apex is commonly used for executing one-time or ad hoc operations directly from the Developer Console, VS Code, or other tools without creating a permanent Apex class. Option B is correct because Anonymous Apex can be used to perform data maintenance tasks, such as deleting 15,000 inactive Accounts after a deployment. Option C is also correct because Anonymous Apex can be used to execute a Batch Apex class by calling
Database.executeBatch(). Option A is incorrect because scheduling an Apex class requires using theSystem.schedule()method with a schedulable class rather than being a primary use case of Anonymous Apex itself. Option D is incorrect because Anonymous Apex does not count toward code coverage and cannot be used to add unit test coverage to an org. -
-
Question 11
Multiple answersA developer creates a Lightning web component that imports a method within an Apex class. When a
Validate button is pressed, the method runs to execute complex validations.
In this implementation scenario, which two options are.. of the Controller according to the MVC
architecture?
Choose 2 answers-
Option A:Correct
HTML file
-
Option B:Correct
Apex class
-
Option C:Correct
JavaScript file
-
Option D:Correct
XML file
Show Answer & Explanation Hide Answer & Explanation
Correct Answer: B, C
Explanation
In the MVC (Model-View-Controller) pattern used in Lightning Web Components, the controller layer is responsible for handling business logic and communication between the view and the server. In this scenario, the Apex class (B) acts as part of the controller because it contains the server-side logic that performs the complex validations. The JavaScript file (C) also acts as part of the controller because it handles user interactions (such as the Validate button click) and calls the Apex method using wire or imperative Apex. The HTML file (A) represents the view layer, and the XML file (D) is only metadata used for configuration, not part of MVC logic.
-
-
Question 12
Multiple answersA developer identifies the following triggers on the Expense _c object:
The triggers process before delete, before insert, and before update events respectively.
Which two techniques should the developer implement to ensure trigger best practices are
followed?
Choose 2 answers-
Option A:Correct
Unity all three triggers In a single trigger on the Expense
c object that Includes all events. -
Option B:Correct
Unify the before insert and before update triggers and use Flow for the delete action.
-
Option C:Correct
Create helper classes to execute the appropriate logic when a record is saved.
-
Option D:Correct
D. Maintain all three triggers on the Expense
definitions object, but move the Apex logic out of the trigger
Show Answer & Explanation Hide Answer & Explanation
Correct Answer: A, C
Explanation
A . Unify all three triggers in a single trigger on the Expense c object that includes all events:
Salesforce best practices recommend having only one trigger per object to avoid redundancy and
conflicts.
By combining all the events (before delete, before insert, and before update) into a single trigger, the
developer can manage the logic in an organized and maintainable manner.
This also simplifies debugging and ensures that the trigger logic executes in a predictable order.
C . Create helper classes to execute the appropriate logic when a record is saved:
Using helper classes allows for a clean separation of concerns. The trigger becomes a dispatcher that
delegates logic to dedicated classes.
For example, you can create methods like applyDefaultsToExpense(), validateExpenseUpdate(), and
deleteExpense() in a helper class and invoke them from the trigger.
This improves reusability, readability, and testability of the code.
Why not the other options?
B . Unify the before insert and before update triggers and use Flow for the delete action:
While Flow is a powerful tool, it is not ideal for deleting records or replacing Apex trigger
functionality, especially when triggers already exist for other events.
D . Maintain all three triggers on the Expense c object but move the Apex logic out of the trigger
definition:
Maintaining multiple triggers on the same object can lead to conflicts and execution order issues,
even if the logic is moved to helper classes.
Reference:
Trigger Best Practices
Trigger Design Patterns -
-
Question 13
Multiple answersA developer identifies the following triggers on the Expense _c object:A developer identifies the following triggers on the Expense _c object:

The triggers process before delete, before insert, and before update events respectively.
Which two techniques should the developer implement to ensure trigger best practices are
followed?
Choose 2 answers-
Option A:Correct
Unity all three triggers In a single trigger on the Expense
c object that Includes all events. -
Option B:Correct
Unify the before insert and before update triggers and use Flow for the delete action.
-
Option C:Correct
Create helper classes to execute the appropriate logic when a record is saved.
-
Option D:Correct
D. Maintain all three triggers on the Expense
definitions object, but move the Apex logic out of the trigger
Show Answer & Explanation Hide Answer & Explanation
Correct Answer: A, C
Explanation
A . Unify all three triggers in a single trigger on the Expense c object that includes all events:
Salesforce best practices recommend having only one trigger per object to avoid redundancy and
conflicts.
By combining all the events (before delete, before insert, and before update) into a single trigger, the
developer can manage the logic in an organized and maintainable manner.
This also simplifies debugging and ensures that the trigger logic executes in a predictable order.
C . Create helper classes to execute the appropriate logic when a record is saved:
Using helper classes allows for a clean separation of concerns. The trigger becomes a dispatcher that
delegates logic to dedicated classes.
For example, you can create methods like applyDefaultsToExpense(), validateExpenseUpdate(), and
deleteExpense() in a helper class and invoke them from the trigger.
This improves reusability, readability, and testability of the code.
Why not the other options?
B . Unify the before insert and before update triggers and use Flow for the delete action:
While Flow is a powerful tool, it is not ideal for deleting records or replacing Apex trigger
functionality, especially when triggers already exist for other events.
D . Maintain all three triggers on the Expense c object but move the Apex logic out of the trigger
definition:
Maintaining multiple triggers on the same object can lead to conflicts and execution order issues,
even if the logic is moved to helper classes.
Reference:
Trigger Best Practices
Trigger Design Patterns -
-
Question 14
Single answerUniversal Containers wants to ensure that all new leads created in the system have a valid email
address. They have already created a validation rule to enforce this requirement, but want to add an
additional layer of validation using automation.
What would be the best solution for this requirement?-
Option A:Correct
Submit a REST API Callout with a JSON payload and validate the fields on a third party system
-
Option B:Correct
Use a before-save Apex trigger on the Lead object to validate the email address and display an
error message if it is invalid -
Option C:Correct
Use a custom Lightning Web component to make a callout to validate the fields on a third party
system. -
Option D:Correct
Use an Approval Process to enforce the completion of a valid email address using an outbound
message action.
Show Answer & Explanation Hide Answer & Explanation
Correct Answer: B
Explanation
Explanation: Before-save Apex Trigger: This is the best solution because a before-save trigger
runs before the record is saved to the database, providing an opportunity to validate or
modify the data. In this case, the Apex trigger can validate the email address using a regular
expression or a third- party API call to ensure the email address is valid. If the email is invalid,
an error message can be displayed using addError(). Why not the other options? A . Submit a
REST API Callout with a JSON payload: REST callouts are more complex and generally not
recommended for simple validation tasks like email format validation. Additionally, callouts
cannot be performed directly in a before-save trigger. C . Use a custom Lightning Web
Component (LWC): LWCs are primarily for UI interactions and should not be used to enforce
data validations that are server-side requirements. D . Use an Approval Process: Approval
Processes are for managing the approval flow of records, not for real-time validations. They
cannot enforce email validation directly. Reference: Apex Triggers Documentation Trigger
Context Variables -
-
Question 15
Single answerA company's engineering department is conducting a month-long test on the scalability of an inhouse-developed software that requires a cluster of 100 or more servers. Which of the following
models is the best to use?-
Option A:Correct
PaaS
-
Option B:Correct
SaaS
-
Option C:Correct
BaaS
-
Option D:Correct
laaS
Show Answer & Explanation Hide Answer & Explanation
Correct Answer: D
Explanation
Infrastructure as a Service (IaaS) is the best model for the scenario described because it provides ondemand access to compute, storage, and networking resources that are ideal for a scalable server
cluster. IaaS allows the engineering team to rent infrastructure resources without having to invest in
physical hardware, making it perfect for temporary or fluctuating workloads, such as scalability
testing.
Key Characteristics of IaaS:
Full control over the operating systems and applications running on the servers.
Flexible resource allocation to support high scalability.
Ideal for custom software testing where specific server configurations may be needed.
Why not the other options?
PaaS (Platform as a Service):
While PaaS is excellent for application development and deployment, it abstracts the infrastructure
layer, which would limit the engineering team's control over the cluster's configuration.
SaaS (Software as a Service):
SaaS delivers fully managed applications, not infrastructure or testing environments. It’s irrelevant
for this use case.
BaaS (Backend as a Service):
BaaS is tailored to mobile or web application backend development, providing APIs and pre-built
services, not infrastructure for a server cluster.
Platform Developer Reference:
While this question is broader than Salesforce-specific concepts, understanding IaaS vs. PaaS is
relevant when working with Salesforce development. For example:
Salesforce operates as a PaaS (e.g., Force.com platform), allowing developers to build and deploy
applications without managing underlying servers.
Testing scalability and performance at an infrastructure level (as in the question) would fall under
IaaS concepts, which Salesforce developers might encounter when integrating external services or
infrastructure like AWS, Azure, or Google Cloud.
This foundational knowledge complements your understanding of cloud services in the Salesforce
ecosystem. -
-
Question 16
Multiple answersWhat are three characteristics of change set deployments?
Choose 3 answers Sending a change set between two orgs requires a deployment connection.-
Option A:Correct
Change sets can deploy custom settings data.
-
Option B:Correct
Change sets can only be used between related organizations.
-
Option C:Correct
Deployment is done in a one-way, single transaction.
-
Option D:Correct
Sending a change set between two orgs requires a deployment connection.
-
Option E:Correct
Change sets can be used to transfer records.
Show Answer & Explanation Hide Answer & Explanation
Correct Answer: B, C, D
Explanation
Change sets can only be used between related organizations:
Change sets require a relationship between the source and target Salesforce orgs, such as a
production org and its sandboxes. You cannot use change sets between unrelated Salesforce orgs.
Reference: Salesforce Change Set Overview
Deployment is done in a one-way, single transaction:
When a change set is deployed, it is applied to the target org as a single transaction. If there are any
errors in the deployment, the entire transaction is rolled back.
Reference: Apex Development Guide
Sending a change set between two orgs requires a deployment connection:
Before sending or deploying a change set, a deployment connection must be established between
the source and target orgs. This connection is configured in the setup menu under "Deployment
Connections."
Reference: Trailhead: Deployment Connections
Incorrect Options:
A . Change sets can deploy custom settings data:
Change sets cannot deploy data, including custom settings data. They only move metadata.
E . Change sets can be used to transfer records:
Records (data) are not supported by change sets; they only facilitate metadata migration. -