Labour Day Special Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: suredis

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

Page: 1 / 24
Total 235 questions

Salesforce Certified Platform Developer I (SP23) Questions and Answers

Testing Engine

  • Product Type: Testing Engine
$42  $119.99

PDF Study Guide

  • Product Type: PDF Study Guide
$36.75  $104.99
Question 1

A developer considers the following snippet of code:

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

Options:

A.

3

B.

1

C.

4

D.

2

Question 2

Cloud kicks has a muli-screen flow its call center agents use when handling inbound service desk calls.

At one of the steps in the flow, the agents should be presented with a list of order number and dates that are retrieved from an external odrer management system in real time and displayed on the screen.

What shuold a developer use to satisfy this requirement?

Options:

A.

An invocae method

B.

An apex REST class

C.

An outbound message

D.

An Apex Controller

Question 3

A developer needs to implement a custom SOAP Web Service that is used by an external Web Application. The developer chooses to Include helper methods that are not used by the Web Application In the Implementation of the Web Service Class.

Which code segment shows the correct declaration of the class and methods?

A)

B)

C)

D)

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Question 4

A developer created this Apex trigger that calls MyClass,myStartmethod:

The developer creates a test method that calls MyClase,myStartmethod directly, resulting in 81% overall code coverage.

What happens wtier the developer tries to deploy the ... and two classes to production, assuming no other code exists?

Options:

A.

The deployment fails because the Apr- MgQM has no code coverage.

B.

The deployment tails because no assertions mett made in the lest method.

C.

The deployment passes became the Apex code has the requited 75% code coverage.

D.

The deployment passes because both classes and the trigger were included ki the deployment.

Question 5

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.

Log capturing via the Debug Logs Setup page

B.

Built-in standard and custom set controllers

C.

Self-contained and reusable units of an application

D.

Rich component ecosystem

Question 6

A custom picklist field, Food_Preference__c, exist 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 most efficient 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" as True.

B.

Set a validation rule to enforce a value is selected.

C.

Mark the field as Required on the field definition.

D.

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

Question 7

What should a developer use to obtain the Id and Name of all the Leads. Accounts, and Contacts that hove the company name "Universal Containers"?

Options:

A.

FIND 'Universal Containers' IN Name Fields RETURNING leadjid, name), accounted, name), contacted, name)

B.

FIND Universal Containers' IN CompanyName Fietds RETURNING lead{ld. name), accounted, name), contacted, name)

C.

SELECT lead(id, name). accountOd, name), contacted, name) FROM Lead, Account, Contact WHERE Name = "universal Containers'

D.

SELECT Lead.id. Lead.Name, Account.Id, AccountName, Contacted, Contact.Name FROM Lead, Account, Contact WHERE CompanvName * Universal Containers'

Question 8

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

Options:

A.

Renaming or replacing picklist

B.

Importing data using the Data Loader and the Bulk API

C.

Converting Leads to Contact accounts

D.

Updating addresses using the Mass Address update tool

Question 9

What writing an Apex class, a developer warts to make sure thai all functionality being developed Is handled as specified by the requirements.

Which approach should the developer use to be sure that the Apex class is working according tospecification?

Options:

A.

Create a test class to execute the business logic and run the test in the Developer Console.

B.

Include a savepoint and Database,rollback.

C.

Include a try/catch block to the Apex class.

D.

Run the code in an Execute Anonymous block n the Deceloper Consider.

Question 10

Assuming that naze is 8 String obtained by an tag on 8 Visualforce page, which two SOQL queries performed are safe from SOQL injection?

‘Choose 2 answers

A)

B)

C)

D)

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Question 11

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.

Record-triggered flow

B.

Formula field

C.

Apex trigger

D.

Field Update actions

Question 12

Which three statements are true regarding custom exceptions in Apex? (Choose three.)

Options:

A.

A custom exception class must extend the system Exception class.

B.

A custom exception class can implement one or many interfaces.

C.

A custom exception class cannot contain member variables or methods.

D.

A custom exception class name must end with “Exception”.

E.

A custom exception class can extend other classes besides the Exception class.

Question 13

A developer must create a CreditcardPayment class that provides an implementation of an existing Payment class. Public virtual class Payment { public virtual void makePayment(Decimal amount) { /*implementation*/ } } Which is the correct implementation?

Options:

A.

Public class CreditcardPayment extends Payment {

public override void makePayment(Decimal amount) { /*implementation*/ }

}

B.

Public class CreditCardPayment implements Payment {

public virtual void makePayment(Decimal amount) { /*implementation*/ }

}

C.

Public class CreditCardPayment extends Payment {

public virtual void makePayment(Decimal amount) { /*implementation*/ }

}

D.

Public class CreditCardPayment implements Payment {

public override void makePayment(Decimal amount) { /*Implementation*/ }

}

Question 14

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 15

Which two sfdx commands can be used to add testing data to a Developer sandbox?

Options:

A.

Forced: data:bulk:upsert

B.

Forced: data: object :upsert

C.

Forced: data: tree: upsert

D.

Forced: data:async:upsert

Question 16

A developer wrote Apex code that calls out to an external system. How should a developer write the test to provide test coverage?

Options:

A.

Write a class that extends HTTPCalloutMock.

B.

Write a class that implements the HTTPCalloutMock interface.

C.

Write a class that implements the WebserviceMock interface.

D.

Write a class that extends WebserviceMock

Question 17

What are two use cases for executing Anonymous Apex code? Choose 2 answers

Options:

A.

To delete 15,000 inactive Accounts In a single transaction after a deployment

B.

To schedule an Apex class to run periodically

C.

To run a batch Apex class to update all Contacts

D.

To add unit test code coverage to an org

Question 18

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

Options:

A.

By providing an Agile process with default steps

B.

By providing code review standards and processes

C.

By providing device-awareness for mobile and desktops

D.

By providing change history and version control

Question 19

A developer created a child Lightning web component nested inside a parent Lightning web component, 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 custom event to pass the data to the child component,

B.

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

C.

The parent component can invoke a method in the child component

D.

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

Question 20

Which three code lines are required to create a Lightning component on a Visualforce page? Choose 3 answers

Options:

A.

$Lightning.createComponent

B.

C.

$Lightning.useComponent

D.

$Lightning.use

E.

Question 21

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

What is the optimal way to Implement this feature?

Options:

A.

Build a flow with flow Builder.

B.

Build an account assignment rule.

C.

Create a formula field.

D.

Create an account approval process.

Question 22

Given the following Anonymous Block:

Which one do you like?

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

Options:

A.

The transaction will fail due to exceeding the governor limit.

B.

The try/catch block will handle any DML exceptions thrown.

C.

The transaction will succeed and changes will be committed.

D.

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

Question 23

Which annotation should a developer use on an Apex method to make it available to be wired to a property in a Lightning web component?

Options:

A.

@RemoteAction

B.

@AureEnabled

C.

@AureEnabled (cacheable=true)

D.

@RemoteAction(|cacheable=true)

Question 24

A developer wants to import 500 Opportunity records into a sandbox. Why should the developer choose to use data Loader instead of Data Import Wizard?

Options:

A.

Data Loader runs from the developer's browser.

B.

Data Import Wizard does not support Opportunities.

C.

Data Loader automatically relates Opportunities to Accounts.

D.

Data Import Wizard cannot import all 500 records.

Question 25

Where are two locations a developer can look to find information about the status of asynchronous or future methods? Choose 2 answers

Options:

A.

Apex Flex Queue

B.

Apex Jobs

C.

Paused Flow Interviews component

D.

Time-Based Workflow Monitor

Question 26

A 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 the component available?

Options:

A.

Add true to the statusComponent.js-meta ml file.

B.

Add lighting _RecordPage to the statusComponent.js-meta ml file.

C.

Add < masterLabel>Account to the statusComponent.js-meta ml file.

D.

Add Lightning_RecordPage to the statusComponent.js file.

Question 27

Which three steps allow a custom SVG to be included in a Lightning web component? Choose 3 answers

Options:

A.

Upload the SVG as a static resource.

B.

Import the static resource and provide a getter for it in JavaScript.

C.

Reference the getter in the HTML template.

D.

Reference the import in the HTML template.

E.

Import the SVG as a content asset file.

Question 28

Which two events need to happen when deploying to a production org? Choose 2 answers

Options:

A.

All triggers must have at least 1% test coverage.

B.

All Apex code must have at least 75% test coverage.

C.

All triggers must have at least 75% test coverage.

D.

All test and triggers must have at least 75% test coverage combined

Question 29

For which three items can a trace flag be configured?

Choose 3 answers

Options:

A.

Process Builder

B.

Visualforce

C.

Apex Class

D.

Apex Trigger

E.

User

Question 30

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

Options:

A.

Bulk API

B.

Tooling API

C.

Setup Menu

D.

Salesforce DX

E.

Metadata API.

Question 31

In terms of the MVC paradigm, what are two advantages of implementing the layer of a Salesforce application using Aura Component-based development over Visualforce? Choose 2 answers

Options:

A.

Self-contained and reusable units of an application

B.

Rich component ecosystem

C.

Automatic code generation

D.

Server-side run-time debugging

Question 32

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

Options:

A.

B.

C.

D.

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 own7

Options:

A.

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

B.

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

C.

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

D.

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

Question 34

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 PostalCodeToTimezone_c custom ogject.

Which two automationtools can be used to implement this feature?

Choose 2 answers

Options:

A.

Approval process

B.

Fast field Updates record-triggered flow

C.

Quick actions

D.

Account trigger

Question 35

A lead developer creates an Apex interface called "Laptop". Consider the following code snippet:

How can a developer use the Laptop Interface within the Silvertaptop class?

Options:

A.

@Extends(class=Laptop'')

public class SilverLaptop

B.

public calss SilverLaptop extends Laptop

C.

@Interface (class=''Laptop'')

public class SilverLaptop

D.

public class Silverlaptop implements Laptop

Question 36

A developer must create a lightning component that allows users to input contact record

information to create a contact record, including a salary__c custom field. what should the

developer use, along with a lightning-record-edit form, so that salary__c field functions as a

currency input and is only viewable and editable by users that have the correct field levelpermissions on salary__C?

Options:

A.

B.

C.

D.

Question 37

A developer has a single custom controller class that works with a Visualforce Wizard to support creating and editing multiple subjects. The wizard accepts data from user inputs across multiple Visualforce pages and from a parameter on the initial URL.

Which three statements are useful inside the unit test to effectively test the custom controller?

Choose 3 answers

Options:

A.

insert pageRef.

B.

Test.setCurrentPage(pageRef);

C.

public ExtendedController(ApexPages StandardController cntrl) { }

D.

ApexPages.CurrentPage().getParameters().put('input\’, 'TestValue');

E.

String nextPage - controller.save().getUrl();

Question 38

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 and method using the public access modifier.

B.

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

C.

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

D.

Declare the class and method using the global access modifier.

Question 39

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

Options:

A.

B.

C.

D.

Question 40

which statement is true regarding execution order when triggers are associated to the same object and event?

Options:

A.

Trigger execution order cannot be guaranteed.

B.

executed In the order they are modified.

C.

Triggers are executed alphabetically by trigger name.

D.

Triggers are executed in the order they are created.

Question 41

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 can be done using the setup menu.

D.

Declarative development does not require Apex test classes.

Question 42

Universal Container* decides to use purely declarative development to build out a new Salesforce application.

Which two options can be used to build out the business logic layer for this application?

Choose 2 answer

Options:

A.

Validation Rules

B.

Remote Actions

C.

Record- Triggered flow

D.

Batch Jobs

Question 43

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.

Use the TestVisible annotation.

D.

Mark the Apex class as global.

Question 44

An org tracks customer orders on an Order object and the items of an Order on the Line Item object. The Line Item object has a MasterDetail relationship to the order object. A developer has a requirement to calculate the order amount on an Order and the line amount on each Line item based on quantity and price.

What is the correct implementation?

Options:

A.

Implement the line amount as a numeric formula field and the order amount as a roll-up summary field.

B.

Write a single before trigger on the Line Item that calculates the item amount and updates the order amount on the Order.

C.

Implement the Line amount as a currency field and the order amount as a SUM formula field.

D.

Write a process on the Line item that calculates the item amount and order amount and updates the filed on the Line Item and the order.

Question 45

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

Options:

A.

A list of newly created sObjects without IDs

B.

null

C.

Undefined

D.

An empty list of sObjects

Question 46

A business has a proprietary Order Management System (OMS) that creates orders from their website and fulfills the orders. When the order is created in the OMS, an integration also creates an order record in Salesforce and relates it to the contact as identified by the email on the order. As the order goes through different stages in the OMS, the integration also updates It in Salesforce. It is noticed that each update from the OMS creates a new order record in Salesforce.

Which two actions will prevent the duplicate order records from being created in Salesforce?

Choose 2 answers

Options:

A.

Ensure that the order number in the OMS is unique.

B.

Use the order number from the OMS as an external ID.

C.

Use the email on the contact record as an external ID.

D.

Write a before trigger on the order object to delete any duplicates.

Question 47

Universal Containers has large number of custom applications that were built using a third-party javaScript framework and exposed using Visualforce pages. The Company wants to update these applications to apply styling that resembles the look and feel of Lightning Experience. What should the developer do to fulfill the business request in the quickest and most effective manner?

Options:

A.

Incorporate the Salesforce Lightning Design System CSS stylesheet into the JavaScript applications.

B.

Rewrite all Visualforce pages asLightning components.

C.

Set the attribute enableLightning to true in the definition.

D.

Enable Available for Lightning Experience, Lightning Communities, and the mobile app on Visualforce pages used by the custom application.

Question 48

Universal Container wants Opportunities to no longer be editable when itreaches the Closed/Won stage. Which two strategies can a developer use to accomplish this?

Choose2 answer

Options:

A.

Use a validation

B.

Use a trigger

C.

Use an after-save flow.

D.

Use the Process Automation settings.

Question 49

Given the following Apex statement:

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

Options:

A.

The query falls and an error Is written to the debug log.

B.

The variable, nvAccount, Is automatically cast to the List data type.

C.

The first Account returned Is assigned to myAccour.t.

D.

An unhandled exception is thrown and the code terminates.

Question 50

What should be used to create scratch orgs?

Options:

A.

Developer Console

B.

Salesforce CLI

C.

Workbench

D.

Sandbox refresh

Question 51

What are two benefits of using declarative customizations over code?

Choose 2 answers

Options:

A.

Declarative customizations automatically update with each Salesforce release.

B.

Declarative customizations generally require less maintenance.

C.

Declarative customizations automatically generate test classes.

D.

Declarative customizations cannot generate run time errors.

Question 52

What are two benefits of using External IDs?

Choose 2 answers

Options:

A.

An External ID field can be used Co reference an ID from another external system.

B.

An External ID can be a formula field to help create a unique key from two fields in Salesforce.

C.

An External ID can be used with Salesforce Mobile to make external data visible.

D.

An External ID is indexed and can improve the performance of SOQl quenes.

Question 53

Universal Containers wants to back up all of the data and attachments in its Salesforce org once month. Which approach should a developer use to meet this requirement?

Options:

A.

Use the Data Loader command line.

B.

Create a Schedulable Apex class.

C.

Schedule a report.

D.

Define a Data Export scheduled job.

Question 54

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

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.

Record-triggered Flow

B.

Formula field

C.

Apex Trigger

D.

Process Builder

Question 55

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.

Vlsualforce Components

C.

Lightning Web Components

D.

Visualforce Pages

Question 56

What are three ways for 2 developer to execute tests in an org? Choose 3 answers

Options:

A.

Metadata APT

B.

Bulk API

C.

Setup Menu

D.

SalesforceDX

E.

Tooling API

Question 57

AW Computing tracks order information in custom objects called order__c and order_Line_ c - Currently, all shipping information is stored in the order__c object.

The company wants to expand Its order application to support split shipments so that any number of order_Line__c records on a single order__c can be shipped to different locations.

What should a developer add to fulfill this requirement?

Options:

A.

Order_shipment_Group_c object and master-detail field on order_Line_c

B.

Order_shipment_Group_c object and master-detail field on order_c

C.

Order_shipment_Group_c object and master-detail field to order_c and Order Line_c

D.

Order_shipment_Group_c object and master-detail field on order_shipment_Group_c

Question 58

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

Options:

A.

Production

B.

Dev Hub

C.

Environment Hub

D.

Sandbox

Question 59

A Lightning component has a wired property, searchResults, that stores a list of Opportunities. Which definition of the Apex method, to which the searchResults property is wired, should be used?

Options:

A.

@AuraEnabled(cacheable=true)

public static List search(String term) { /* implementation*/ }

B.

@AuraEnabled(cacheable=true) public List search(String term) { /*implementation*/ }

C.

@AuraEnabled(cacheable=false) public static List search(String term) { /*implementation*/ }

D.

@AuraEnabled(cacheable=false) public List search(String term) { /*implementation*/ }

Question 60

What are three characteristics of change set deployments?

Choose 3 answers

Options:

A.

Change sets can only be used between related organizations.

B.

Change sets can be used to transfer records.

C.

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

D.

Change sets can deploy custom settings data.

E.

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

Question 61

A developer is asked to prevent anyone other than a user with Sales Manager profile from changing the Opportunity Status to Closed Lost if the lost reason is blank.

Which automation allows the developer to satisfy this requirement in the most efficient manner?

Options:

A.

A record trigger flow on the Opportunity object

B.

An Apex trigger on the Opportunity object

C.

approval process on the Opportunity object

D.

An error condition formula on a validation rule on Opportunity

Question 62

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.

Roll-up summary field

B.

Quick action

C.

Apex trigger

D.

Formula field

Question 63

Which salesforce org has a complete duplicate copy of the production org including data and configuration?

Options:

A.

Developer Pro Sandbox

B.

Partial Copy Sandbox

C.

Production

D.

Full Sandbox

Question 64

n org has an existing flow that creates an Opportunity with an Update Records element. A developer must update the flow to aiso create a ‘Contact and store the created Contact's 1D on the Opportunity.

Which update must the developer make in the flow?

Options:

A.

Add a new Get Records element.

B.

Add a new Create Records element.

C.

Add a new Update Records element.

D.

Add a new Roll back Records element

Question 65

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.

Auto-launched flow on Task

B.

Apex trigger on Task

C.

Task actions

D.

Record-trigger flow on Opportunity

Question 66

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

Choose 3 answers

Options:

A.

Process Flows

B.

Workflow Rules

C.

Criteria-based Sharing calculations

D.

Email messages

E.

Roll-Up Summary fields

Question 67

Which two scenarios require an Apex method to be called imperatively from a Lightning web component?

Choose 2 answer

Options:

A.

Calling a method that makes a web service callout

B.

Calling a method that is not annotated with cacheable-true

C.

Calling a method with the click of a button

D.

Calling a method that is external to the main controller for the Lightning web component

Question 68

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.

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

B.

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

C.

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

D.

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

Question 69

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.

VSCode

B.

Change Sets

C.

SFDX CLI

D.

Developer Console

Question 70

Which scenario is valid for execution by unit tests?

Options:

A.

Load data from a remote site with a callout.

B.

Set the created date of a record using a system method.

C.

Execute anonymous Apex as a different user.

D.

Generate a Visualforce PDF with geccontentAsPDF ().

Page: 1 / 24
Total 235 questions