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

Salesforce CRT-450 Salesforce Certified Platform Developer 1 (SP25) Exam Practice Test

Page: 1 / 20
Total 204 questions

Salesforce Certified Platform Developer 1 (SP25) Questions and Answers

Testing Engine

  • Product Type: Testing Engine
$37.5  $124.99

PDF Study Guide

  • Product Type: PDF Study Guide
$33  $109.99
Question 1

A developer needs to make a custom Lightning Web Component available in the Salesforce Classic user interface Which approach can be used to accomplish this?

Options:

A.

Embed the Lightning Web Component is a Visualforce Component and add directly to the page layout.

B.

Use the Lightning Out JavaScript library to embed the Lightning Web Component in a Visualforce page and add to the page layout.

C.

Use a Visualforce page with a custom controller to invoke the Lightning Web Component using a call to an Apex method.

D.

Wrap the Lightning Web Component in an Aura Component and surface the Aura Component as a Visualforce tab.

Question 2

A developer is integrating with a legacy on-premise SQL database.

What should the developer use to ensure the data being integrated is matched to the right records in Salesforce?

Options:

A.

External Object

B.

External ID field

C.

Formula field

D.

Lookup field

Question 3

A developer has identified a method in an Apex class that performs resource intensive actions in memory by iterating over the result set of a SOQL statement on the account. The method also performs a DML statement to save the changes to the database.

Which two techniques should the developer implement as a best practice to ensure transaction control and avoid exceeding governor limits'*

Choose 2 answers

Options:

A.

Use the @ReadOnly annotation to bypass the number of rows returned by a SOQL.

B.

Use partial DML statements to ensure only valid data is committed.

C.

Use the System.limit class to monitor the current CPU governor limit consumption.

D.

Use the Database.Savepoint method to enforce database integrity.

Question 4

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

Question 5

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 able to return more records

C.

SOQL Is faster for text searches.

D.

SOSL is able to return more records.

Question 6

Which three Salesforce resources can be accessed from a Lightning web component?

Choose 3 answers

Options:

A.

Static resources

B.

All external libraries

C.

SVG resources

D.

Third-party web components

E.

Content asset files

Question 7

The Account object in an organization has a master-detail relationship to a child object called Branch. The following automations exist:

* Roll-up summary fields

* Custom validation rules

* Duplicate rules

developer created a trigger on the Account object.

Which two things should the developer consider while testing the trigger code?

Choose 2 answers

Options:

A.

Rollup summary fields can cause the parent record to go through Save.

B.

Duplicate rules are executed once all DML operations commit to the database.

C.

The trigger may fire multiple times during a transaction.

D.

The validation rules will cause the trigger to fire again.

Question 8

A developer writes a trigger on the Account object on the before update event that increments a count field. A record triggered flow also increments the count field every time that an Account is created or updated.

What is the value of the count field if an Account is inserted with an initial value of zero, assuming no other automation logic is implemented on the Account?

Options:

A.

4

B.

2

C.

1

D.

3

Question 9

A Salesforce administrator used Flow Builder to create a flow named "accountOnboarding". The flow must be used inside an Aura component.

Which tag should a developer use to display the flow in the component?

Options:

A.

lightning: flow

B.

lightning-low

C.

sure-flow

D.

aura: flow

Question 10

What is a benefit of developing applications

Options:

A.

Enforced unit testing and code coverage best practices

B.

Access to predefined computing resources

C.

Preconfigured storage for big data

D.

Unlimited processing power and memory

Question 11

(Full question statement)

Universal Containers wants Opportunities to no longer be editable when they reach the Closed/Wonstage.

Which two strategies can a developer use to accomplish this?

Choose 2 answers.

Options:

A.

Use an automatically launched Approval Process.

B.

Use a Validation Rule.

C.

Use a before-save Apex Trigger.

D.

Use an Auto-Response Rule.

Question 12

Universal Containers has a 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.

Rewrite all Visualforce pages as Lightning components.

B.

Set the attribute enableLightning to true in the definition.

C.

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

D.

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

Question 13

Cloud Kicks has a multi-screen flow that 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 numbers and dates that are retrieved from an external order management system in real time and displayed on the screen.

What should a developer use to satisfy this requirement?

Options:

A.

An outbound message

B.

An Apex REST class

C.

An Apex controller

D.

An invocable method

Question 14

What are three characteristics of change set deployments?

Choose 3 answers Sending a change set between two orgs requires a deployment connection.

Options:

A.

Change sets can deploy custom settings data.

B.

Change sets can only be used between related organizations.

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 be used to transfer records.

Question 15

What are two use cases for executing Anonymous Apex code?

Choose 2 answers

Options:

A.

schedule an Apex class to run periodically

B.

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

C.

To run a batch Apex class to update all Contacts

D.

To add unit test code coverage to an org

Question 16

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

Question 17

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 18

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

Question 19

Consider the following code snippet:

public static List obtainAllFields(Set leadIds) {

List result = new List();

for (Id leadId : leadIds) {

result.add([SELECT FIELDS(ALL) FROM Lead WHERE Id = :leadId]);

}

return result;

}

Given the multi-tenant architecture of the Salesforce platform, what is a best practice a developer should implement to ensure successful execution of the method?

Options:

A.

Avoid using variables as query filters.

B.

Avoid performing queries inside for loops.

C.

Avoid executing queries without a limit clause.

D.

Avoid returning an empty List of records.

Question 20

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

apex

Copy

public class CustomerOrder {

// code implementation

}

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

Options:

A.

extends (class="OrderRequest")public class CustomerOrder

B.

public class CustomerOrder implements Order

C.

public class CustomerOrder extends OrderRequest

D.

@Implements (class="OrderRequest")public class CustomerOrder

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

Question 22

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.

Question 23

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?

Options:

A.

apex

Copy

webservice class WebServiceClass {

private Boolean helperMethod() { /* implementation ... */ }

global static String updateRecords() { /* implementation ... */ }

}

B.

apex

Copy

global class WebServiceClass {

private Boolean helperMethod() { /* implementation ... */ }

webservice static String updateRecords() { /* implementation ... */ }

}

C.

apex

Copy

webservice class WebServiceClass {

private Boolean helperMethod() { /* implementation ... */ }

webservice static String updateRecords() { /* implementation ... */ }

}

D.

apex

Copy

global class WebServiceClass {

private Boolean helperMethod() { /* implementation ... */ }

global String updateRecords() { /* implementation ... */ }

}

Question 24

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

Options:

A.

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

B.

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

C.

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

D.

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

Question 25

Universal Containers 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 answers

Options:

A.

Record-Triggered Flow

B.

Batch Jobs

C.

Remote Actions

D.

Validation Rules

Question 26

Which exception type cannot be caught?

Options:

A.

custom exception

B.

LinkException

C.

NoAccessException

D.

CelloutException

Question 27

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

Question 28

A developer needs to create a baseline set of data (Accounts, Contacts, Products, Assets) for an entire suite of Apex tests allowing

them to test isolated requirements for various types of Salesforce cases.

Which approach can efficiently generate the required data for each unit test?

Options:

A.

Create a mock using the HttpcalloutMock interface.

B.

Use @TestSetup with a void method.

C.

Add @IsTest (seeAllData=true) at the start of the unit test class.

D.

Create test data before Test .startTest() in the unit test.

Question 29

(Full question statement)

A developer is tasked with building a custom Lightning Web Component (LWC) to collectContactinformation. The form will be shared among different types of users in the org. There are security requirements stating that only certain fields should beeditable and visibleto certain groups of users.

What should the developer use in their Lightning Web Component to support the security requirements?

Options:

A.

lightning-input-field

B.

force:inputField

C.

aura:input

D.

ui:inputField

Question 30

Which three data types can a SOQL query return?

Choose 3 answers

Options:

A.

Double

B.

O Long

C.

sObject

D.

dg Integer

E.

List

Question 31

Universal Containers (UC) processes orders in Salesforce in a custom object, Order__c. 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 a Queueable class 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 an @future method called from a trigger

Question 32

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

Question 33

An Opportunity needs to have an amount rolled up from a custom object that is not in a master-detail relationship.

How can this be achieved?

Options:

A.

Write a trigger on the Opportunity object and use tree sorting to sum the amount for all related child objects under the Opportunity.

B.

Use the Streaming API to create real-time roll-up summaries.

C.

Write a trigger on the child object and use an aggregate function to sum the amount for all related child objects under the Opportunity.

D.

Use the Metadata API to create real-time roll-up summaries.

Question 34

A developer is creating an app that contains multiple Lightning web components.

One of the child components is used for navigation purposes. When a user clicks a button called Next in the child component, the parent component must be alerted so it can navigate to the next page.

How should this be accomplished?

Options:

A.

Update a property on the parent.

B.

Call a method in the Apex controller.

C.

Fire a notification.

D.

Create a custom event.

Question 35

If Apex code executes inside the execute() method of an Apex class when implementing the Batchable interface, which two statements are true regarding governor limits?

Choose 2 answers

Options:

A.

The Apex governor limits are reset for each iteration of the execute () method.

B.

The Apex governor limits cannot be exceeded due to the asynchronaus nature of the transaction.

C.

The Apex governor limits will use the asynchronous limit levels.

D.

The Apex governor limits are omitted while calling the constructor of the Apex class.

Question 36

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?

Options:

A.

apex

Copy

@InvocableMethod

global static List> getLevel(List input)

{ /*implementation*/ }

B.

apex

Copy

@InvocableMethod

global Recommendation getLevel(ContactWrapper input)

{ /*implementation*/ }

C.

apex

Copy

@InvocableMethod

global List> getLevel(List input)

{ /*implementation*/ }

D.

apex

Copy

@InvocableMethod

global static List getLevel(List input)

{ /*implementation*/ }

Question 37

(Full question statement)

Which code displays the contents of a Visualforce page as a PDF?

Options:

A.

B.

C.

D.

Question 38

Refer to the following Apex code:

apex

Copy

Integer x = 0;

do {

x++;

} while (x < 1);

System.debug(x);

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

Options:

A.

0

B.

2

C.

1

D.

3

Question 39

A developer is alerted to an issue with a custom Apex trigger that is causing records to be duplicated.

What is the most appropriate debugging approach to troubleshoot the issue?

Options:

A.

Review the Historical Event logs to identify the source of the issue.

B.

Add system.debug statements to the code to track the execution flow and identify the issue.

C.

Use the Apex Interactive Debugger to step through the code and identify the issue.

D.

Disable the trigger in production and test to see if the issue still occurs.

Question 40

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.

@AuraEnabled(cacneable=true)

B.

@RemoteAction (cacheable-true)

C.

@RemoteAction

D.

@AuraEnabled

Question 41

A Primaryld_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 .. 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.

Upload the CSV into-a custom object related to candidate__c.

B.

Create a before insert trigger to correctly map the records,

C.

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

D.

Create a before save flow to correctly map the records.

Question 42

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.

Question 43

A developer is working on a project to import data from an external system into Salesforce. The data contains sensitive information that should not be visible to all users in Salesforce.

What should the developer do to ensure that the data is secure?

Options:

A.

Use a third-party tool to encrypt the sensitive data before importing it into Salesforce.

B.

Use the Apex Data Loader to import the into and write Apex code to handle security and accesscontrol.

C.

Use the Data Import Wizard to import the data arid set up field-level security to restrict access tosensitive fields.

D.

Use the Salesforce CLI to import the data and set up user permissions to restrict access to sensitive data.

Question 44

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.

Add custom controller attributes to display the message.

B.

Use a try/catch with a custom exception class.

C.

Include on the Visualforce page.

D.

Perform the DML using the database.unsert() method,

Question 45

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.

Question 46

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

Question 47

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

Question 48

A Developer Edition org has five existing accounts. A developer wants to add 10 more accounts for testing purposes.

The following code is executed in the Developer Console using the Execute Anonymous window:

How many total accounts will be in the org after this code is executed?

Options:

A.

5

B.

6

C.

10

D.

15

Question 49

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 LATEST formula on each of the latest availability date fields.

B.

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

C.

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

D.

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

Question 50

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.

Question 51

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 this component available?

Choose 2 answers

Options:

A.

Add lightning_Recordpage to the statuscomponent. js file,

B.

Add lightning RecordPage to the statusComp .js-meta.xml file.

C.

Set is Exposes to true In the statuscomponent.js-meta.xml file.

D.

Add Account to the statusComponent. js-meta.xm1 file.

Question 52

A developer wants to mark each Account in a List as either Active or Inactive, based on the value in the LastModified each Account being greater than 90 days in the past.

Which Apex technique should the developer use?

Options:

A.

An if-else statement, with a for loop inside

B.

A witch statement, with a for loop inside

C.

A for loop, with an if or if/else statement inside

D.

A for loop, with a switch statement inside

Question 53

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

Options:

A.

@RemoteAction

B.

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

C.

@HttpInvocable

D.

@Aurabnabled(cacheable=true)

Question 54

A developer needs to allow users to complete a form on an Account record that will create a 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 Dynamic Form.

B.

Create a Custom Permission for the users.

C.

Add a Dynamic Action to the Users’ assigned Page Layouts.

D.

Create a Lightning wed component.

E.

Add a Dynamic Action to the Account Record Page.

Question 55

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.

Salesforce CLI

B.

Visual Studio Code

C.

Force.com Toolkit

D.

Developer Console

Question 56

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) {}

}

Question 57

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 the @isTest (seeAllData=true) annotation in the test class.

B.

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

C.

Create a static resource containing test data.

D.

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

Question 58

How many Accounts will be inserted by the following block of code?

Options:

A.

100

B.

0

C.

150

D.

500

Question 59

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

Question 60

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.

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

B.

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

C.

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

D.

Order has are-parentable master-detail field to Line Item.

Question 61

Refer to the component code requirements below:

{!v.account.Name}

{!v.account.AccountNumber}

{!v.account.Industry}

Requirements:

    For mobile devices, the information should display in three rows.

    For desktops and tablets, the information should display in a single row.

Requirement 2 is not displaying as desired.

Which option has the correct component code to meet the requirements for desktops and tablets?

Options:

A.

{!v.account.Name}

{!v.account.AccountNumber}

{!v.account.Industry}

B.

{!v.account.Name}

{!v.account.AccountNumber}

{!v.account.Industry}

C.

{!v.account.Name}

{!v.account.AccountNumber}

{!v.account.Industry}

D.

{!v.account.Name}

{!v.account.AccountNumber}

{!v.account.Industry}

Page: 1 / 20
Total 204 questions