Winter Sale- Special Discount Limited Time 65% Offer - Ends in 0d 00h 00m 00s - Coupon code: netdisc

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

Page: 1 / 17
Total 174 questions

Salesforce Certified Platform Developer I (SU24) Questions and Answers

Question 1

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.

Quick Actions

B.

Validation rules

C.

Record triggered flows

D.

Apex triggers

Question 2

A developer needs to prevent the creation of Request__c records when certain conditions exist in the system. A RequestLogic class exists that checks the conditions.

What is the correct implementation?

A)

Question # 2

B)

Question # 2

C)

Question # 2

D)

Question # 2

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Question 3

Developers at Universal Containers (UC) use version control to share their code changes, but they notice that when they deploy their code to different environments they often have failures. They decide to set up Continuous Integration (CI).

What should the UC development team use to automatically run tests as part of their CI process?

Options:

A.

Developer Console

B.

Visual Studio Code

C.

Salesforce CLI

D.

Force.com Toolkit

Question 4

A company has a custom object, order__ ¢, that has a required, unique external ID field called crder_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:

D.

upserrc orders Order Number_c;

Question 5

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 6

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 7

Which statement generates a list of Leads and Contacts that have a field with the phrase 'ACME'?

A)

Question # 7

B)

Question # 7

C)

Question # 7

D)

Question # 7

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Question 8

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

Question # 8

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 9

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?

Options:

A.

Use a MAX Roll-Up Summary field on the latest availability date fields.

B.

Use a CEILING formula on each of the latest availability date fields.

C.

Use a LATEST formula on each of the latest availability date fields.

D.

Use a DAYS formula on each of the availability date fields and a COUNT Roll-Up Summary field on the Order.

Question 10

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

Options:

A.

@HttpInvocable

B.

@RemoteAction

C.

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

D.

@AuraEnabled(cacheable=true)

Question 11

Universal Containers has a Visualforce page that displays a table of every Container___c being rented by a given Account. Recently this page is failing with a view state limit because some of the customers rent over 10,000 containers.

What should a developer change about the Visualforce page to help with the page load errors?

Options:

A.

Implement pagination with an OffsetController.

B.

Use JavaScript remoting with SOQL Offset.

C.

Implement pagination with a StandardSetController.

D.

Use lazy loading and a transient List variable.

Question 12

A developer identifies the following triggers on the Expense__c object:

Question # 12

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 13

A developer must create a DrawList class that provides capabilities defined in the Sortable and Drawable interfaces.

Question # 13

Which is the correct implementation?

A)

Question # 13

B)

Question # 13

Options:

A.

Option A

B.

Option B

Question 14

Which exception type cannot be caught?

Options:

A.

NoAccessException

B.

LimitException

C.

CalloutException

D.

A custom exception

Question 15

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

Options:

A.

import updatelccounts from '@aalesforce/apeax/AccountController':

B.

import updateiccounta from 'AccountConctroller':

C.

import updatelccounta from ‘RAccountContraller,updateiccounta’;

D.

import updase’Accounts from

'@=salesforce/apex/AccountController ., updateaccounts’;

Question 16

team of developers is working on a source-driven project that allows them to work independently, with many different org configurations.

Which type of Salesforce orgs should they use for their development?

Options:

A.

Full Copy sandboxes

B.

Developer orgs

C.

Developer sandboxes

D.

Scratch orgs

Question 17

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 18

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 19

Universal Containers wants Opportunities to no longer be editable when it reaches the Closed/Won stage.

Which two strategies can a developer use to accomplish this?

Options:

A.

Use a validation rule.

B.

Use a before-save Apex trigger.

C.

Use an automatically launched Approval Process.

D.

Use an auto-response rule.

Question 20

Universal Containers wants to assess the advantages of declarative development versus programmatic customization for specific use cases in its Salesforce implementation.

What are two characteristics of declarative development over programmatic customization?

Choose 2 answers

Options:

A.

Declarative code logic does not require maintenance or review.

B.

Declarative development has higher design limits and query limits.

C.

Declarative development does not require Apex test classes.

D.

Declarative development can be done using the Setup menu.

Question 21

What Is the result of the following code?

Question # 21

Options:

A.

The record will not be created and an exception will be thrown.

B.

The record will be created and no error will be reported,

C.

The record will not be created and no error will be reported.

D.

The record will be created and a message will be in the debug log.

Question 22

A developer is migrating a Visualforce page into a Lightning web component.

Salesforce Certified Platform Developer I

The Visualforce page shows information about a single record. The developer decides to use Lightning Data Service to access record data.

Which security consideration should the developer be aware of?

Options:

A.

The isaccessisle() method must be used for field-level access checks.

B.

Lightning Data Service ignores field-level security.

C.

The with sharing keyword must be used to enforce sharing rules.

D.

Lightning Data Service handles sharing rules and field-level security.

Question 23

A developer created a child Lightning web component nested inside a parent Lightning web component. The parent component needs to pass a string value to the child component.

In which two ways can this be accomplished?

Choose 2 answers

Options:

A.

The parent component can use a public property to pass the data to the child component.

B.

The parent component can invoke a public method in the child component.

C.

The parent component can use a custom event to pass the data to the child component.

D.

The parent component can use the Apex controller class to send data to the child component.

Question 24

What are three characteristics of change set deployments?

Choose 3 answers

Options:

A.

Change sets can deploy custom settings data.

B.

Change sets can be used to transfer records.

C.

Deployment is done in a one-way, single transaction.

D.

Sending a change set between two orgs requires a deployment connection.

E.

Change sets can only be used between related organization

Question 25

What should a developer use to script the deployment and unit test execution as part of continuous integration?

Options:

A.

VS Code

B.

Developer Console

C.

Execute Anonymous

D.

Salesforce CLI

Question 26

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 27

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 28

Which two settings must be defined in order to update a record of a junction object? Choose 2 answers

Options:

A.

Read/Write access on the primary relationship

B.

Read/Write access on the secondary relationship

C.

Read/Write access on the junction object

D.

Read access on the primary relationship

Question 29

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

Choose 3 answers

Options:

A.

Setup Menu

B.

Tooling API

C.

Metadata API

D.

Salesforce DX

E.

Bulk APL

Question 30

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 31

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.

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

B.

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

C.

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

D.

Use the Salesforce Streaming API to perform the SOQL query.

Question 32

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 33

Which three statements are accurate about debug logs?

Choose 3 answers

Options:

A.

A System debug logs are retained for 24 hours.

B.

Only the 20 most recent debug logs for a user are kept.

C.

Debug log levels are cumulative, where FINE log level includes all events logged at the DEBUG, INFO, WARN, and ERROR levels.

D.

Debug logs can be set for specific users, classes, and triggers.

E.

The maximum size of 3 debug log is 5 MB.

Question 34

A developer wants to get access to the standard price book in the org while writing a test class that covers an OpportunitylLineltem trigger.

Which method allows access to the price book?

Options:

A.

Use @IaTest (SeeAllData=true) and delete the existing standard price book,

B.

Use Test.loadData() and a static resource to load a standard price book,

C.

Use @TestVisible to allow the test method to see the standard price book.

D.

Use Teat.getStandardPricebookId() to get the standard price book 1D.

Question 35

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 36

A developer considers the following snippet of code:

Question # 36

Based on this code, what is the value of %?

Options:

A.

1

B.

3

C.

4

D.

2

Question 37

How is a controller and extension specified for a custom object named "Notice" on a Visualforce page?

Options:

A.

apex:page controller="Notice_ c" extensions="myControllerExtension”

B.

apax:page=Notice extends="myControllerExtension’’

C.

apax:page controllers="Norice &£, myConrrollerExtansicon™

D.

apex:page standardController="Notice__c" extensions="myConctrollerExtension”

Question 38

Universal Containers has developed custom Apex code and Lightning Components in a Sandbox environment. They need to deploy the code and associated configurations to the Production environment.

What is the recommended process for deploying the code and configurations to Production?

Options:

A.

Use the Force.com IDE to deploy the Apex code and Lightning Components.

B.

Use the Ant Migration Tool to deploy the Apex code and Lightning Components.

C.

Use a change set to deploy the Apex code and Lightning Components.

D.

Use Salesforce CLI to deploy the Apex code and Lightning Components.

Question 39

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 a PoataliCodeToTimezcone o custom object.

Which two automation tools can be used to implement this feature?

Choose 2 answers

Options:

A.

Quick actions

B.

Account trigger

C.

Approval process

D.

Fast Field Updates record-triggered flow

Question 40

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 41

What are two ways a developer can get the status of an enqueued job for a class that implements the queueable interface?

Choose 2 answers

Options:

A.

View the Apex Flex Queue

B.

View the Apex Status page

C.

View the Apex Jobs page

D.

Query the AsyncApexJob object

Question 42

Refer to the following Apex code:

Question # 42

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

Options:

A.

0

B.

1

C.

2

D.

3

Question 43

developer must provide custom user interfaces when users edit a Contact 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 component in Lightning Experience

D.

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

Question 44

Given the following Apex statement:

Question # 44

What occurs when more than one Account is returned by the SOQL query?

Options:

A.

The query fails and an error is written to the debug log.

B.

An unhandled exception is thrown and the code terminates.

C.

The variable, myaccount, is automatically cast to the List data type.

D.

The first Account returned is assigned to myAccount,

Question 45

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

Options:

A.

list of newly created sObjects without IDs

B.

Undefined

C.

null

D.

An empty list of sObjects

Question 46

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 47

Since Aura application events follow the traditional publish- subscribe model, which method is used to fire an event?

Options:

A.

registerEvent

B.

fireEvent ()

C.

emit{)

D.

fire()

Question 48

A developer created a new after insert trigger on the Lead object that creates Task records for each Lead.

After deploying to production, an existing outside integration that inserts Lead records in batches to Salesforce is occasionally reporting total batch failures being caused by the Task insert statement. This causes the integration process in the outside system to stop, requiring a manual restart.

Which change should the developer make to allow the integration to continue when some records in a batch cause failure due to the Task insert statement, so that manual restarts are not needed?

Options:

A.

Deactivate the trigger before the integration runs.

B.

Remove the Apex class from the integration user's profile,

C.

Use a try-catch block after the insert statement,

D.

Use the Database method with allOrNone set to false.

Question 49

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 50

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 51

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:

Question # 51

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 52

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)

Question # 52

B)

Question # 52

C)

Question # 52

D)

Question # 52

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Page: 1 / 17
Total 174 questions