New Year Special Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: 70percent

Salesforce CRT-450 Salesforce Certified Platform Developer I (SU24) Exam Practice Test

Demo: 52 questions
Total 174 questions

Salesforce Certified Platform Developer I (SU24) Questions and Answers

Question 1

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

Options:

A.

Remove static from line 03.

B.

Add @IsTest above line 03.

C.

Change public to private on line 01.

D.

Add @1sTest above line 01.

Question 2

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?

Options:

A.

Account,iaDelecable ()

B.

accountRec.a0biectType.iaDeletable()

C.

accountRec.islCelezable()

D.

Schema.sObjectType.Account,isDeletetable() Account,isDelecable ()

Question 3

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 8ECTOITYJ2WFORCED in the SOQL that fetches the data for the component.

B.

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

C.

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

D.

Use security.stripinaccessible to remove fields inaccessible to the current user.

Question 4

A developer needs to allow users to complete a form on an Account record that will create record for a custom object.

The form needs to display different fields depending on the user’s job role. The functionality should only be available to a small group of users.

Which three things should the developer do to satisfy these requirements?

Choose 3 answers

Options:

A.

Create a Custom Permission for the users.

B.

Create a Lightning web component,

C.

Add a Dynamic Action to the Account Record Page.

D.

Add a Dynamic Action to the Users' assigned Page Layouts,

E.

Create a Dynamic Form.

Question 5

Universal Containers (UC) processes orders in Salesforce in a custom object, ord=xr <. They also allow sales reps to upload CSV files with thousands of orders at a time.

A developer is tasked with integrating orders placed in Salesforce with UC’s enterprise resource planning (ERP) system.

After the status for an order__ c is first set to 'Placed’, the order information must be sent to a REST endpoint in the ERP system that can process one order at a time.

What should the developer implement to accomplish this?

Options:

A.

Callout from an Qfuture method called from a trigger

B.

Callout from a Batchable class called from a scheduled job

C.

Flow with a callout from an invocable method

D.

Callout from a Queueable class called from a trigger

Question 6

A team of many developers work in their own individual orgs that have the same configuration as the production org.

Which type of org is best suited for this scenario?

Options:

A.

Partner Developer Edition

B.

Developer Edition

C.

Developer Sandbox

D.

Full Sandbox

Question 7

What are three capabilities of the tag when loading JavaScript resources in Aura components?

Choose 3 answers

Options:

A.

Specifying loading order

B.

One-time loading for duplicate scripts

C.

Loading files from Documents

D.

Loading externally hosted scripts

E.

Loading scripts in parallel

Question 8

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 Get Records element.

C.

Add a new Roll Back Records element.

D.

Add a new Create Records element.

Question 9

What should a developer do to check the code coverage of a class after running all tests?

Options:

A.

View the Class Test Percentage tab on the Apex Class list view in Salesforce Setup.

B.

View the code coverage percentage for the class using the Overall Code Coverage panel in the Developer Console Tests tab,

C.

View the Code Coverage column in the list view on the Apex Classes page.

D.

Select and run the class on the Apex Test Execution page in the Developer Console.

Question 10

A developer creates a new Apex trigger with a helper class, and writes a test class that only exercises 95% coverage of the new Apex helper class.

Change Set deployment to production fails with the test coverage warning:

"Test coverage of selected Apex Trigger is 0%, at least 1% test coverage is required."

What should the developer do to successfully deploy the new Apex trigger and helper class?

Options:

A.

Create a test class and methods to cover the Apex trigger.

B.

Increase the test class coverage on the helper class.

C.

Remove the failing test methods from the test class.

D.

Run the tests using the 'Run All Tests’ method.

Question 11

A Primaryid__c custom field exists on the candidate_ c custom object. The field is used to store each candidate's id number and is marked as Unique in the schema definition.

As part of a data enrichment process, Universal Containers has a CSV file that contains updated data for all candidates in the system. The file contains each Candidate's primary id as a data point. Universal Containers wants to upload this information into Salesforce, while ensuring all data rows are correctly mapped to a candidate in the system.

Which technique should the developer implement to streamline the data upload?

Options:

A.

Create a before Insert trigger to correctly map the records.

B.

Create a before save flow to correctly map the records.

C.

Update the PrimaryId__ c field definition to mark it as an External Id.

D.

Upload the CSV into a custom object related to Candidate__ c.

Question 12

What are two considerations for deploying from a sandbox to production? Choose 2 answers

Options:

A.

Should deploy during business hours to ensure feedback can be quickly addressed.

B.

All triggers must have at least one line of test coverage.

C.

least 75% of Apex code must be covered by unit tests.

D.

Unit tests must have calls to the System.assert method.

Question 13

Cloud Kicks Fitness, an ISV Salesforce partner, is developing a managed package application. One of the application modules allows the user to calculate body fat

using the Apex class, BodyFat, and its method, calculateBodyFat (). The product owner wants to ensure this method is accessible by the consumer of the application when

developing customizations outside the ISV's package namespace.

Which approach should a developer take to ensure calculateBodyFat () is accessible outside the package namespace?

Options:

A.

Declare the class as global and use the public access modifier on the method.

B.

Declare the class and method using the global access modifier.

C.

Declare the class and method using the public access modifier.

D.

Declare the class as public and use the global access modifier on the method.

Question 14

A developer created a trigger on the Account object and wants to test if the trigger is properly bulkified. The developer team decided that the trigger should be tested with 200 account records with unique names.

What two things should be done to create the test data within the unit test with the least amount of code?

Choose 2 answers

Options:

A.

Use Test.loadData to populate data in your test methods.

B.

Create a static resource containing test data.

C.

Use the @isTest (isParallel=true) annotation in the test class.

D.

Use the @isTest (seeAllData=true) annotation in the test class.

Question 15

While developing an Apex class with custom search functionality that will be launched from a Lightning Web Component, how can the developer ensure only records accessible to the currently logged in user are displayed?

Options:

A.

Use the inherited sharing keyword.

B.

Use the WITH SECURITY_ENFORCED clause within the SOQL.

C.

Use the with sharing keyword.

D.

Use the without sharing keyword.

Question 16

Universal Containers has a support process that allows users to request support from its engineering team using a custom object, Engineering_Support__ c.

Users should be able to associate multiple Engineering_ support___c records to a single Opportunity record. Additionally, aggregate information about the Engineering Support__ c records should be shown on the Opportunity record.

Which relationship field should be implemented to support these requirements?

Options:

A.

Lookup field from Opportunity to Engineering_Support__c

B.

Master-detail field from Engine=ring Support__c to Opportunity

C.

Master-detail field from Opportunity to Engineering_Supports__c

D.

Lookup field from Engineering Support__c to Opportunity

Question 17

Universal Containers is building a recruiting app with an Applicant object that stores information about an individual person and a Job object that represents a job. Each applicant may apply for more than one job.

What should a developer implement to represent that an applicant has applied for a job?

Options:

A.

Master-detail field from Applicant to Job

B.

Junction object between Applicant and Job

C.

Formula field on Applicant that references Job

D.

Lookup field from Applicant to Job

Question 18

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.

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

B.

Check the debug logs for the batch job.

C.

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

D.

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

Question 19

How can a developer check the test coverage of autolaunched Flows before deploying them in a change set?

Options:

A.

Use SOQL and the Tooling APL.

B.

Use the Flow Properties page.

C.

Use the Code Coverage Setup page.

D.

Use the ApextestResult class.

Question 20

Which two operations affect the number of times a trigger can fire?

Choose 2 answers

Options:

A.

After-save record-triggered flow

B.

Criteria-based sharing calculations

C.

Email messages

D.

Roll-up summary fields

Question 21

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:

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

Choose 2 answers

Options:

A.

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

B.

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

C.

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

D.

Use the @Readonly annotation and the with sharing keyword on the class

Question 22

Which two actions may cause triggers to fire?

Choose 2 answers

Options:

A.

Cascading delete operations

B.

Changing a user's default division when the transfer division option is checked

C.

Updates to FeedItem

D.

Renaming or replacing a picklist entry

Question 23

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.

Record-triggered flow on opportunity

C.

Auto-launched flow on Task

D.

Task actions

Question 24

The Job_application_ c custom object has a field that is a master-detail relationship to the Contact object, where the Contact object is the master.

As part of a feature implementation, a developer needs to retrieve a list containing all Contact records where the related Account Industry is 'Technology', while also retrieving the Contact's Job_Application__c records.

Based on the object's relationships, what is the most efficient statement to retrieve the list of Contacts?

A)

B)

C)

D)

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Question 25

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

Options:

A.

Unify all three triggers in a single trigger on the expense__c object that includes all events.

B.

Create helper classes to execute the appropriate logic when a record is saved.

C.

Maintain all three triggers on the expense__c object, but move the Apex logic out of the trigger definition.

D.

Unify the before insert and before update triggers and use Flow for the delete action.

Question 26

Flow Builder uses an Apex action to provide additional information about multiple Contacts, stored in a custom class, Con

Which is the correct definition of the Apex method that gets the additional information?

A)

B)

C)

D)

Options:

A.

Option A

B.

Option

C.

Option

D.

Option

Question 27

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

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

Options:

A.

Total number of SOQL queries issued

B.

Total number of DML statements issued

C.

Total number of records processed as a result of DML statements

D.

Total number of records retrieved by SOQL queries

Question 28

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?

Options:

A.

Setup Menu

B.

Developer Console

C.

Visual Studio Code IDE

D.

AppExchange

Question 29

A Next Best Action strategy uses an Enhance element that invokes an Apex method to determine a discount level for a Contact, based on a number of factors.

What is the correct definition of the Apex method?

A)

B)

C)

D)

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Question 30

In the following example, which sharing context will myMethod execute when it is invoked?

Options:

A.

Sharing rules will be inherited from the calling context.

B.

Sharing rules will not be enforced for the running user.

C.

Sharing rules will be enforced by the instantiating class.

D.

Sharing rules will be enforced for the running user.

Question 31

A developer wrote Apex code that calls out to an external system using REST API.

How should a developer write the test to prove the code is working as intended?

Options:

A.

Write a class that implements WebServiceMock.

B.

Write a class that extends HTTPCalloutMock.

C.

Write a class that extends WerServiceMack.

D.

write a class that implements HTTPCalloutMock.

Question 32

Universal Containers hires a developer to build a custom search page to help users find the Accounts they want. Users will be able to search on Name, Description,

and a custom comments field.

Which consideration should the developer be aware of when deciding between SOQL and SOSL?

Choose 2 answers

Options:

A.

SOSL is faster for text searches.

B.

SOQL is faster for text searches.

C.

SOSL is able to return more records.

D.

SOQL is able to return more records.

Question 33

A developer has the following requirements:

Calculate the total amount on an Order.

Calculate the line amount for each Line Item based on quantity selected and price.

Move Line Items to a different Order if a Line Item Is not In stock.

Which relationship implementation supports these requirements on its own?

Options:

A.

Order has a re-parentable lookup field to Line Item,

B.

Order has a re-parentable master-detail field to Line Item.,

C.

Line Item has a re-parentable lookup field to Order.

D.

Line Item has a re-parentable master-detail field to Order.

Question 34

What are two benefits of using declarative customizations over code? Choose 2 answers

Choose 2 answers

Options:

A.

Declarative customization* automatically generate test classes.

B.

Declarative customizations cannot generate run time errors.

C.

Declarative customizations automatically update with each Salesforce release.

D.

Declarative customizations generally require less maintenance.

Question 35

What are two considerations for running a flow in debug mode? Choose 2 answers

Options:

A.

Clicking Pause or executing a Pause element closes the flow and ends debugging.

B.

Input variables of type record cannot be passed into the flow.

C.

DML operations will be rolled back when the debugging ends.

D.

Callouts to external systems are not executed when debugging a flow.

Question 36

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.

Apex trigger

B.

validation rule

C.

After record-triggered flow

D.

Before record-triggered flow

Question 37

A developer created a trigger on a custom object. This custom object also has some dependent pick lists.

According to the order of execution rules, which step happens first?

Options:

A.

Old values are overwritten with the new record values.

B.

JavaScript validation is run in the browser,

C.

System validation is run for maximum field lengths,

D.

The original record Is loaded from the database.

Question 38

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.

Aura Components

B.

Visualforce Pages

C.

Lightning Web Components

D.

Visualforce Components

Question 39

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.

Self-contained and reusable units of an application

B.

Log capturing via the Debug Logs Setup page

C.

Rich component ecosystem

D.

Built-in standard and custom set controllers

Question 40

Which Lightning Web Component custom event property settings enable the event to bubble up the containment hierarchy and cross the Shadow DOM boundary?

Options:

A.

bubbles: true, composed: true

B.

bubbles: true, composed: false

C.

bubbles: false, composed: false

D.

bubbles: false, composed: true

Question 41

What are three considerations when using the @InvocableMethod annotation in Apex?

Choose 3 answers

Options:

A.

Only one method using the @InvocableMethod annotation can be defined per Apex class.

B.

A method using the @InvocableMathod annotation must define a return value,

C.

A method using the @InvocableMethod annotation can have multiple input parameters.

D.

A method using the @InvocablsMethod annotation must be declared as static.

E.

A method using the @InvocableMathod annotation can be declared as Public Global.

Question 42

A developer has a Visualforce page and custom controller to save Account records. The developer wants to display any validation rule violations to the user.

How can the developer make sure that validation rule violations are displayed?

Options:

A.

Include on the Visualforce page.

B.

Use a try/catch with a custom exception class.

C.

Add custom controller attributes to display the message.

D.

Perform the DML using the patabase.upsert () method.

Question 43

A custom object Trainer_ < has a lookup field to another custom object cym__ c.

Which SOQL query will get the record for the Viridian City Gym and all it's trainers?

Options:

A.

SELECT Id; (SELECT Id FROM Trainers_r) FROM Gym_ _c WHERE Name = 'Viridian City Gym'

B.

SELECT Id, (SELECT Id FROM Trainer_c) FROM Gym__c WHERE Name = 'Viridian City Gym'

C.

SELECT ID FROM Trainer ¢ WHERE Gym__r.Name = 'Viridian City Gym'

D.

SELECT Id, (SELECT Id FROM Trainers_c) FROM Gym_c WHERE Name - 'Viridian City Gym’'

Question 44

Universal Containers has implemented an order management application. Each Order can have one or more Order Line items. The Order Line object is related to the Order via a master-detail relationship. For each Order Line item, the total price is calculated by multiplying the Order Line item price with the quantity ordered.

What is the best practice to get the sum of all Order Line item totals on the Order record?

Options:

A.

Quick action

B.

Apex trigger

C.

Roll-up summary field

D.

Formula field

Question 45

A custom Visualforce controller calls the apexPages.addMessage () method, but no messages are rendering on the page.

Which component should be added to the Visualforce page to display the message?

Options:

A.

B.

C.

D.

Question 46

Which three data types can a SOQL query return?

Choose 3 answers

Options:

A.

sObject

B.

Double

C.

Long

D.

List

E.

Integer

Question 47

What are two characteristics related to formulas?

Choose 2 answers

Options:

A.

Formulas are calculated at runtime and are not stored in the database.

B.

Formulas can reference themselves.

C.

Formulas can reference values in related objects.

D.

Fields that are used in a formula field can be deleted or edited without editing the formula.

Question 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.

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

C.

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

D.

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

Question 49

A developer at AW Computing is tasked to create the supporting test class for programmatic customization that leverages records stored within the custom object, Pricing_Structure__c. AW Computing has a complex pricing structure for each item on the store, spanning more than 500 records,

Which two approaches can the developer use to ensure Pricing Strucrture_c records are available when the test class is executed?

Choose 2 answers

Options:

A.

Use a Test Data Factory class.

B.

Use the Test.loadTesc() method.

C.

Use the @T=Test (SeefAllDaca=rru=) annotation.

D.

Use without sharing on the class declaration.

Question 50

Which exception type cannot be caught?

Options:

A.

NoAccessException

B.

LimitException

C.

CalloutException

D.

A custom exception

Question 51

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

Options:

A.

Add a test method in the Apex class,

B.

Use the SeeAllData annotation.

C.

Use the @TestVisible annotation.

D.

Mark the Apex class as global.

Question 52

Refer to the following Apex code:

What is the value of x when it is written to the debug log?

Options:

A.

0

B.

1

C.

2

D.

3

Demo: 52 questions
Total 174 questions