Salesforce Prepare for your Platform Developer I Certification CRT-450 Exam Questions

Page: 1 / 14
Total 201 questions
Question 1

A 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?



Answer : A


Question 2

Universal 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?



Answer : B

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.


Apex Triggers Documentation

Trigger Context Variables

Question 3

A developer must troubleshoot to pinpoint the causes of performance issues when a custom page loads in their org.

Which tool should the developer use to troubleshoot query performance?



Answer : D


Question 4

A lead developer creates a virtual class called "OrderRequest". Consider the following code snippet:

How can a developer use the OrderRequest class within the CustomerOrder class?



Answer : C


Question 5

Universal Containers (UC) uses out-of-the-box order management, that has a Master-Detail relationship between Order and Order Line Item.

UC stores the availability date on each Order Line Item and Orders are only shipped when all of the Order Line Items are available.

Which method should be used to calculate the estimated ship date for an Order?



Answer : D


Question 6

A developer deployed a trigger to update the status__c of Assets related to an Account when the Account's status changes and a nightly integration that updates Accounts in bulk has started to fail with limit failures.

What should the developer change about the code to address the failure while still having the code update all of the Assets correctly?



Answer : D


Question 7

A developer must write an Apex method that will be called from a Lightning component. The method may delete an Account stored in the accountRec variable.

Which method should a developer use to ensure only users that should be able to delete Accounts can successfully perform deletions?



Answer : B


Page:    1 / 14   
Total 201 questions