Weekend Sale Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: pass65

CRT-450 Salesforce Certified Platform Developer 1 (SP25) Questions and Answers

Questions 4

Which two statements are true about using the @testSetup annotation in an Apex test class?

Choose 2 answers

Options:

A.

Records created in the test setup method cannot be updated in individual test methods.

B.

In a test setup method, test data is inserted once and made available for all test methods In the test class.

C.

A method defined with the @testSetup annotation executes once for each test method in the test class and counts towards system limits.

D.

The @testSetup annotation is not supported when the @isTest(SeeAllData=True) annotation is used .

Buy Now
Questions 5

A developer is implementing an Apex class for a financial system. Within the class, the variables 'creditAmount' and 'debitAmount' should not be able to change once a value is assigned.

In which two ways can the developer declare the variables to ensure their value can only be assigned one time?

Choose 2 answers

Options:

A.

Use the static keyword and assign its value in a static initializer.

B.

Use the final keyword and assign its value in the class constructor.

C.

Use the final keyword and assign its value when declaring the variable.

D.

Use the static keyword and assign its value in the class constructor.

Buy Now
Questions 6

Given the following Anonymous block:

CRT-450 Question 6

What should a developer consider for an environment that has over 10,000 Case records?

CRT-450 Question 6

What should a developer consider for an environment that has over 10,000 Case records?

Options:

A.

The transaction will succeed and changes will be committed.

B.

The try-catch block will handle exceptions thrown by governor limits.

C.

The transaction will fail due to exceeding the governor limit.

D.

The try-catch block will handle any DML exceptions thrown,

Buy Now
Questions 7

Which action causes a before trigger to fire by default for Accounts?

Options:

A.

Renaming or replacing picklists

B.

updating addresses using Mass Address updated tool

C.

Importing data using the Data Loader and the Bulk API

D.

Converting Leads to Contacts

Buy Now
Questions 8

A developer completed modifications feature that is comprised of two elements:

* Apex trigger

* Trigger handler Apex class

What are two factors that the developer must take into account to properly deploy them to the production environment?

Choose 2 answers

Options:

A.

Apex classes must have at least 75% code coverage org-wide.

B.

All methods in the test classes must use @istest.

C.

At least one line of code must be executed for the Apex trigger.

D.

Test methods must be declared with the testMethod keyword.

Buy Now
Questions 9

Universal Containers is developing a new Lightning web component for their marketing department. They want to ensure that the component is fine-tuned and provides a seamless user experience.

What are some benefits of using the Lightning Component framework?

Options:

A.

Better performance due to client-side rendering

B.

Automatic support for accessibility standards

C.

Compatibility with all web browsers

D.

Easy integration with third-party libraries

Buy Now
Questions 10

When a user edits the Postal Code on an Account, a custom Account text field named "Timezone" must be updated based on the values in another custom object called PostalCodeToTimezone__c.

What is the optimal way to implement this feature?

Options:

A.

Build a flow with Flow Builder.

B.

Create an account approval process.

C.

Create a formula field.

D.

Build an account assignment rule.

Buy Now
Questions 11

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

Options:

A.

Use WITH SECURITY_ENFORCED In the SOQL that fetches the data for the component,

B.

Use Security.stripInaccessible Le to remove fields inaccessible to the current user.

C.

Use Lightning Locker Service to enforce sharing rules and field-level security.

D.

Use Lightning Data Service to get the collection of sales records.

Buy Now
Questions 12

Which code in a Visualforce page and/or controller might present a security vulnerability?

Options:

A.

<apex:outputText value="{!SCurrentPage.parameters.userInput}" />

B.

<apex:outputText escape="false" value="{!sCurrentPage.parameters.userInput}" />

C.

<apex:outputField value="{!ctrl.userInput}" rendered="{!isEditable}" />

D.

<apex:outputField value="{!ctrl.userInput}" />

Buy Now
Questions 13

A company decides to implement a new process where every time an Opportunity is created, a follow up Task should be created and assigned to the Opportunity Owner.

What is the most efficient way for a developer to implement this?

Options:

A.

Apex trigger on Task

B.

Task actions

C.

Auto-launched flow on Task

D.

Record-triggered flow on Opportunity

Buy Now
Questions 14

What are two ways for a developer to execute tests in an org?

Choose 2 answers

Options:

A.

Tooling API

B.

Metadata API

C.

Bulk API

D.

Developer Console

Buy Now
Questions 15

Which Apex class contains methods to return the amount of resources that have been used for a particular governor, such as the number of DML statements?

Options:

A.

OrgLimits

B.

Limits

C.

Messaging

D.

Exception

Buy Now
Questions 16

A developer is tasked to perform a security review of the ContactSearch Apex class that exists in the system. Within the class, the developer identifies the following method as a security threat:

ist performSearch (String lastName} [

return Database.query('SELECT Id, FirstName, LastName FROM Contact WHERE LastName Like

s'+lastName+'s'")?;

What are two ways the developer can update the method to prevent a SOQL injection attack?

Choose 2 answers

Options:

A.

Use variable binding and replace the dynamic query with a static SOQL.

B.

Use the sacapeSingleQuotes method to sanitize the parameter before its use.

C.

Use the ¢Readonly annotation and the with sharing keyword on the class.

D.

Use a regular expression on the parameter to remove special characters.

Buy Now
Questions 17

Universal Containers (UC) is developing a process for their sales teams that requires all sales reps to go through a set of scripted steps with each new customer they create.

In the first step of collecting information, UC's ERP system must be checked via a REST endpoint to see if the customer exists. If the customer exists, the data must be presented to the sales rep in Salesforce.

Which two should a developer implement to satisfy the requirements?

Choose 2 answers

Options:

A.

Flow

B.

Invocable method

C.

Future method

D.

Trigger

Buy Now
Questions 18

A developer creates a custom exception as shown below:

public class ParityException extends Exception { }

What are two ways the developer can fire the exception in Apex?

Options:

A.

throw new ParityException ();

B.

throw new parityException ('parity does not match');

C.

new ParityException ();

D.

new ParityException('parity does not match');

Buy Now
Questions 19

The following code snippet is executed by a Lightning web component in an environment with more than 2,000 lead records:

CRT-450 Question 19

Which governor limit will likely be exceeded within the Apex transaction?

Options:

A.

Total number of SOOL quires issued

B.

Total number of DML statements issued

C.

Total number of records processed as a result of DML statements

Buy Now
Questions 20

While working in a sandbox, an Apex test fails when run in the Test Runner. However, executing the Apex logic in the Execute Anonymous window succeeds with no exceptions or errors.

Why did the method fail in the sandbox test framework but succeed in the Developer Console?

Options:

A.

The test method does not use system. runAs to execute as a specific user.

B.

The test method is calling an @future method.

C.

The test method relies on existing data in the sandbox.

D.

The test method has a syntax error in the code.

Buy Now
Questions 21

A developer must implement a CheckPaymentProcessor class that provides check processing payment capabilities that adhere to what is defined for payments in the PaymentProcessor interface.

apex

Copy

public interface PaymentProcessor {

void pay(Decimal amount);

}

Which is the correct implementation to use the PaymentProcessor interface class?

Options:

A.

apex

Copy

public class CheckPaymentProcessor implements PaymentProcessor {

public void pay(Decimal amount) {}

}

B.

apex

Copy

public class CheckPaymentProcessor implements PaymentProcessor {

public void pay(Decimal amount);

}

C.

apex

Copy

public class CheckPaymentProcessor extends PaymentProcessor {

public void pay(Decimal amount);

}

D.

apex

Copy

public class CheckPaymentProcessor extends PaymentProcessor {

public void pay(Decimal amount) {}

}

Buy Now
Questions 22

A developer needs to have records with specific field values in order to test a new Apex class.

What should the developer do to ensure the data is available to the test?

Options:

A.

Use SOQL to query the org for the required data.

B.

Use Test.loadData() and reference a CSV file in a static resource.

C.

Use Anonymous Apex to create the required data.

D.

Use Test. loadData() and reference a JSON file in Documents.

Buy Now
Questions 23

A credit card company needs to implement the functionality for a service agent to process damaged or stolen credit cards. When the customers call in, the service

agent must gather many pieces of information. A developer is tasked to implement this functionality.

What should the developer use to satisfy this requirement in the most efficient manner?

Options:

A.

Screen-based flow

B.

Approval process

C.

Apex trigger

D.

Lightning Component

Buy Now
Questions 24

When using Salesforce DX, what does a developer need to enable to create and manage scratch orgs?

Options:

A.

Sandbox

B.

Environment Hub

C.

Production

D.

Dev Hub

Buy Now
Questions 25

What can be easily developed using the Lightning Component framework?

Options:

A.

Salesforce Classic user interface pages

B.

Lightning Pages

C.

Customized JavaScript buttons

D.

Salesforce integrations

Buy Now
Questions 26

The following Apex method is part of the ContactService class that is called from a trigger:

CRT-450 Question 26

How should the developer modify the code to ensure best practices are met?

A)

CRT-450 Question 26

B)

CRT-450 Question 26

C)

CRT-450 Question 26

D)

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Buy Now
Questions 27

The value of the account type field is not being displayed correctly on the page. Assuming the custom controller is properly referenced on the Visualforce page, what should the developer do to correct the problem?

Options:

A.

Add a getter method for the actType attribute.

B.

Change theAccount attribute to public.

C.

Add with sharing to the custom controller.

D.

Convert theAccount.Type to a String.

Buy Now
Questions 28

A custom picklist field, Pool Preference ¢, exists on a custom object. The picklist contains the following options: ‘Vegan’, ‘Kosher’, 'No Preference’. The developer must ensure a value is populated every time a record is created or updated.

What is the optimal way to ensure a value is selected every time a record is saved?

Options:

A.

Set "Use the first value in the list as the default value" to True.

B.

Write an Apex trigger to ensure a value is selected,

C.

Mark the field as Required on the object's page layout.

D.

Mark the field as Required on the field definition.

Buy Now
Questions 29

(Full question statement)

Which statement generates a list ofLeadsandContactsthat have a field containing the phrase "ACME"?

Options:

A.

List searchList = [FIND '*ACME*' IN FIELDS RETURNING Contact, Lead];

B.

List> searchList = [SELECT Name, Id FROM Contact, Lead WHERE Name LIKE '%ACME%'];

C.

List> searchList = [FIND '*ACME*' IN ALL FIELDS RETURNING Contact, Lead];

D.

List searchList = [find 'acme' in all fields returning Contact, Lead];

Buy Now
Questions 30

Which three steps allow a custom Scalable Vector Graphic (SVG) to be included in a Lightning web component?

Choose 3 answers

Options:

A.

Import the static resource and provide a JavaScript property for it.

B.

Upload the SVG as a static resource.

C.

Reference the import in the HTML template.

D.

Import the SVG as a content asset file.

E.

Reference the property in the HTML template.

Buy Now
Questions 31

A developer created a trigger on the Account object. While testing the trigger, the developer sees the error message ‘Maximum trigger depth exceeded’.

What could be the possible causes?

Options:

A.

The developer does not have the correct user permission.

B.

The trigger is too long and should be refactored into a helper class.

C.

The trigger does not have sufficient code coverage.

D.

The trigger is getting executed multiple times.

Buy Now
Questions 32

Universal Containers decided to transition from Classic to Lightning Experience. They asked a developer to replace a JavaScript button that was being used to create records with prepopulated values.

What can the developer use to accomplish this?

Options:

A.

Validation rules

B.

Apex triggers

C.

Record triggered flows

D.

Quick Actions

Buy Now
Questions 33

How should a developer write unit tests for a private method in an Apex class?

Options:

A.

Use the SeeAllData annotation.

B.

Add a test method in the Apex class.

C.

Mark the Apex class as global.

D.

Use the @TestVisible annotation.

Buy Now
Questions 34

A development team wants to use a deployment script to automatically deploy to a sandbox during their development cycles.

Which two tools can they use to run a script that deploys to a sandbox?

Choose 2 answers

Options:

A.

SFDX CLI

B.

Developer Console

C.

Change Sets

D.

Ant Migration Tool

Buy Now
Questions 35

Which annotation exposes an Apex class as a RESTful web service?

Options:

A.

@RemoteAction

B.

@RestResource (urlMapping='/myService/*"')

C.

@HttpInvocable

D.

@Aurabnabled(cacheable=true)

Buy Now
Questions 36

A developer is asked to write helper methods that create test data for unit tests.

CRT-450 Question 36

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

Options:

A.

@isTest above line 03.

B.

Add @istest above line 01.

C.

Change public to private on line 01.

D.

Remove static from line 03.

Buy Now
Questions 37

Which code statement includes an Apex method named updateAccounts in the class AccountController for use in a Lightning web component?

Options:

A.

import updateAccounts from "AccountControlles';

B.

import updateAccounts from "Salesforce/apex/AccountController:';

C.

import updateAccounts from "Account@ontroller.updateAccounts';

D.

import updateAccounts from "@salesforce/apex/AccountController.updateAccounts";

Buy Now
Questions 38

How does the Lightning Component framework help developers implement solutions faster?

Options:

A.

By providing device-awareness for mobile and desktops

B.

By providing an Agile process with default steps

C.

By providing change history and version control

D.

By providing code review standards and processes

Buy Now
Questions 39

A company has a custom object, order __c, that has a required, unique external ID field called order Number__c.

Which statement should be used to perform the DML necessary to insert new records and update existing records in a list of Order __c records

using the external ID field?

Options:

A.

merge orders;

B.

merge orders Order Number_c;

C.

upsert orders Order Number c;

D.

upsert orders;

Buy Now
Questions 40

A software company is using Salesforce to track the companies they sell their software to in the Account object. They also use Salesforce to track bugs in their software with a custom object, Bug__c.

As part of a process improvement initiative, they want to be able to report on which companies have reported which bugs. Each company should be able to report multiple bugs and bugs can also be reported by multiple companies.

What is needed to allow this reporting?

Options:

A.

Roll-up summary field of Bug_c on Account

B.

Master-detail field on Bug_c to Account

C.

Lookup field on Bug_c to Account

D.

Function object between Bug__c and Account

Buy Now
Questions 41

A developer must perform a complex SOQL query that joins two objects in a Lightning component.

How can the Lightning component execute the query?

Options:

A.

Write the query in a custom Lightning web component wrapper and invoke from the Lightning component.

B.

Invoke an Apex class with the method annotated as @AuraEnabled to perform the query.

C.

Use the Salesforce Streaming APL to perform the SOQL query.

D.

Create a flow to execute the query end invoke from the Lightning component.

Buy Now
Questions 42

What are two benefits of using declarative customizations over code?

Choose 2 answer

Options:

A.

Declarative customizations automatically update with each Salesforce release.

B.

Declarative customizations automatically generate test classes.

C.

Declarative customizations cannot generate run time errors

D.

Declarative customizations generally require less maintenance

Buy Now
Questions 43

A developer is creating a page that allows users to create multiple Opportunities. The developer is asked to verify the current user's default Opportunity record type, and set certain default values based on the record type before inserting the record.

How can the developer find the current user's default record type?

Options:

A.

Create the opportunity and check the opportunity. recordtype, which will have the record ID of the current user's default record type, before inserting.

B.

Query the Profile where the ID equals userinfo.getprofileID () and then use the profile opportunity. getdefaultresoratype (} method,

C.

Use the schema. Userinfo. Opportunity. getDefaultRecordType {) method.

D.

Use opportunity. sobjectTyps. getDeacribse().getRecordTypeInfos {) to get a list of record types, and iterate through them until isDefaultRecordtypeMapping {) is true.

Buy Now
Questions 44

An org has an existing flow that edits an Opportunity with an Update Records element. A developer must update the flow to also create a Contact and store the created Contact’s ID on the Opportunity.

Which update must the developer make in the flow?

Options:

A.

Add a new Update Records element.

B.

Add a new Roll Back Records element.

C.

Add a new Create Records element.

D.

Add a new Get Records element.

Buy Now
Questions 45

A developer created these three Rollup Summary fields in the custom object, Project__c:

The developer is asked to create a new field that shows the ratio between rejected and approved timesheets for a given project.

Which should the developer use to implement the business requirement in order to minimize maintenance overhead?

Options:

A.

Formula field

B.

Record-triggered flow

C.

Roll-up summary field

D.

Apex trigger

Buy Now
Questions 46

A developer must provide custom user interfaces when users edit a Contact in either Salesforce Classic or Lightning Experience.

What should the developer use to override the Contact's Edit button and provide this functionality?

Options:

A.

A Lightning component in Salesforce Classic and a Lightning component in Lightning Experience

B.

A Lightning page in Salesforce Classic and a Visualforce page in Lightning Experience

C.

A Visualforce page in Salesforce Classic and a Lightning page in Lightning Experience

D.

A Visualforce page in Salesforce Classic and a Lightning component in Lightning Experience

Buy Now
Questions 47

As part of new feature development, a developer is asked to build a responsive application capable of responding to touch events, that will be executed on stateful clients.

Which two technologies are built on a framework that fully supports the business requirement? Choose 2 answers

Options:

A.

Lightning Web Components

B.

Visualforce Components

C.

Visualforce Pages

D.

Aura Components

Buy Now
Questions 48

Which two are best practices when it comes to Aura component and application event handling?

Choose 2 answers

Options:

A.

Try to use application events as opposed to component events.

B.

Reuse the event logic in a component bundle, by putting the logic in the helper.

C.

Use component events to communicate actions that should be handled at the application level.

D.

Handle low-level events in the event handler and re-fire them as higher-level events.

Buy Now
Questions 49

Universal Containers wants to back up all of the data and attachments in its Salesforce org once a month.

Which approach should a developer use to meet this requirement?

Options:

A.

Schedule a report.

B.

Use the Data Loader command line.

C.

Define a Data Export scheduled job.

D.

Create a Schedulable Apex class.

Buy Now
Questions 50

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

Options:

A.

Check the asynchronous job monitoring page to view the job status and logs.

B.

Check the debug logs for the batch job.

C.

Disable the batch job and recreate it with a smaller number of records.

D.

Decrease the batch size to reduce the load on the system.

Buy Now
Questions 51

What is the value of the Trigger.old context variable in a before insert trigger?

Options:

A.

An empty list of sObjects

B.

Undefined

C.

null

D.

A list of newly created sObjects without IDs

Buy Now
Questions 52

In terms of the MVC paradigm, what are two advantages of implementing the view layer of a Salesforce application using Lightning Web Component-based development over Visualforce?

Choose 2 answers

Options:

A.

Rich component ecosystem

B.

Leg capturing via the Debug Logs Setup page

C.

Built-in standard and custom set controllers

D.

Self-contained and reusable units of an application

Buy Now
Questions 53

Universal Containers wants a list button to display a Visualforce page that allows users to edit multiple records.

Which Visualforce feature supports this requirement?

Options:

A.

Standard Controller with Custom List Controller extension

B.

Custom List Controller with recorasetvar page attribute

C.

Controller Extension and tag

D.

Standard controller and the recordsetvar page attribute

Buy Now
Questions 54

Which statement should be used to allow some of the records in a list of records to be inserted if others fail to be inserted?

Options:

A.

Database. insert (records, true)

B.

insert records

C.

insert (records, false)

D.

Database. insert (records, false)

Buy Now
Questions 55

The orderHelper class is a utility class that contains business logic for processing orders. Consider the following code snippet:

Public class without sharing orderHelper {// code implementation

}

A developer needs to create a constant named delivery_multiplier with a value of 4.15. The value of the constant should not change at any time in the code.

How should the developer declare the delivery multiplier constant to meet the business objectives?

Options:

A.

static decimal DELIVERY_MULTIPLIER = 4.15;

B.

constant decimal DELIVERY_MULTIPLIER = 4.15;

C.

static final decimal DELIVERY_MULTIPLIER = 4.15;

D.

decimal DELIVERY_MULTIPLIER = 4.15;

Buy Now
Questions 56

Universal Containers needs to create a custom user interface component that allows users to enter information about their accounts.

The component should be able to validate the user input before saving the information to the database.

What is the best technology to create this component?

Options:

A.

Flow

B.

Lightning Web Components

C.

Visualforce

D.

VUE JavaScript framework

Buy Now
Questions 57

Consider the following code snippet for a Visualforce page that is launched using a Custom Button on the Account detail page layout.

CRT-450 Question 57

When the Save button is pressed the developer must perform a complex validation that involves multiple objects and, upon success, redirect the user to another Visualforce page.

What can the developer use to meet this business requirement?

Options:

A.

Apex

B.

trigger

C.

Controller

D.

extension

Buy Now
Questions 58

Universal Containers (UC) wants to lower its shipping cost while making the shipping process more efficient. The Distribution Officer advises UC to implement global addresses to allow multiple Accounts to share a default pickup address. The developer is tasked to create the supporting object and relationship for this business requirement and uses the Setup Menu to create a custom object called "Global Address".

Which field should the developer add to create the most efficient model that supports the business need?

Options:

A.

Add a master-detail field on the Global Address object to the Account object.

B.

Add a lookup field on the Global Address object to the Account object.

C.

Add a lookup field on the Account object to the Global Address object.

D.

Add a master-detail field on the Account object to the Global Address object.

Buy Now
Questions 59

Consider the following code snippet:

apex

CopyEdit

public class with sharing AccountsController {

@AuraEnabled

public List getAllAccounts(){

return [SELECT Id, Name, Industry FROM Account];

}

}

Apex Test Class Snippet:

apex

CopyEdit

@isTest

private class with sharing AccountsController_Test {

@testSetup

private static void makeData(){

User user1 = [SELECT Id FROM User WHERE Profile.Name = 'System Administrator' AND isActive = true LIMIT 1];

User user2 = [SELECT Id FROM User WHERE Profile.Name = 'Standard User' AND UserName = 'test@test.com' AND isActive = true LIMIT 1];

TestUtils.insertAccounts(10, user1.Id);

TestUtils.insertAccounts(20, user2.Id);

}

@isTest

private static void getAllAccounts_StandardUser_Test(){

List result = AccountsController.getAllAccounts();

System.assertEquals(20, result.size());

}

}

When the test class runs, the assertion fails.

Which change should the developer implement in the Apex test method to ensure the test method executes successfully?

Options:

A.

Query the Administrator user into memory and enclose lines 15 and 16 within the System.runAs(user); method.

B.

Query the Standard User into memory and enclose lines 15 and 16 within the System.runAs(); method.

C.

Add @isTest(seeAllData=true); to line 12 and enclose lines 15 and 16 within Test.startTest(); and Test.stopTest();.

D.

Add System.runAs(user); to line 14 and enclose line 15 within Test.startTest(); and Test.stopTest();.

Buy Now
Questions 60

Which statement describes the execution order when triggers are associated to the same object and event?

Options:

A.

Triggers are executed in the order they are modified.

B.

Trigger execution order cannot be guaranteed.

C.

Triggers are executed alphabetically by trigger name.

D.

Triggers are executed in the order they are created.

Buy Now
Questions 61

Managers at Universal Containers want to ensure that only decommissioned containers are able to be deleted in the system. To meet the business requirement a Salesforce developer adds "Decommissioned" as a picklist value for the Status _c custom field within the Container _c object.

Which two approaches could a developer use to enforce only Container records with a status of "Decommissioned" can be deleted?

Choose 2 answers

Options:

A.

Before record-triggered flaw

B.

Apex trigger

C.

After record-triggered flow

D.

Validation rule

Buy Now
Exam Code: CRT-450
Exam Name: Salesforce Certified Platform Developer 1 (SP25)
Last Update: Jun 7, 2025
Questions: 204

PDF + Testing Engine

$57.75  $164.99

Testing Engine

$43.75  $124.99
buy now CRT-450 testing engine

PDF (Q&A)

$36.75  $104.99
buy now CRT-450 pdf