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

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

Page: 1 / 20
Total 201 questions

Salesforce Certified Platform Developer 1 (SP25) Questions and Answers

Question 1

What does the Lightning Component framework provide to developers?

Options:

A.

Support for Classic and Lightning UIs

B.

Prebuilt components that can be reused

C.

Templates to create custom components

D.

Extended governor limits for applications

Question 2

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

public class SilverLaptop{

//code implementation

How can a developer use the Laptop interface within the silverLaptop class?

A)

Question # 2

B)

C)

Question # 2

D)

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Question 3

(Full question statement)

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 virtual void makePayment(Decimal amount) { /* implementation */ } }

B.

public class CreditCardPayment implements Payment { public virtual void makePayment(Decimal amount) { /* implementation */ } }

C.

public class CreditCardPayment implements Payment { public override void makePayment(Decimal amount) { /* implementation */ } }

D.

public class CreditCardPayment extends Payment { public override void makePayment(Decimal amount) { /* implementation */ } }

Question 4

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

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

Options:

A.

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

B.

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

C.

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

D.

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

Question 5

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: false

B.

bubbles: false, composed: false

C.

bubbles: true, composed: true

D.

bubbles: false, composed: true

Question 6

Management asked for opportunities to be automatically created for accounts with annual revenue greater than $1, 000,000. A developer created the following trigger on the Account object to satisfy this requirement.

for (Account a : Trigger.new) {

if (a.AnnualRevenue > 1000000) {

List oppList = [SELECT Id FROM Opportunity WHERE AccountId = :a.Id];

if (oppList.size() == 0) {

Opportunity oppty = new Opportunity(Name = a.Name, StageName = 'Prospecting', CloseDate = System.today().addDays(30));

insert oppty;

}

}

}

Users are able to update the account records via the UI and can see an opportunity created for high annual revenue accounts. However, when the administrator tries to upload a list of 179 accounts using Data Loader, it fails with system, Exception errors.

Which two actions should the developer take to fix the code segment shown above?

Choose 2. answers

Options:

A.

Query for existing opportunities outside the for loop.

B.

Check if all the required fields for Opportunity are being added on creation.

C.

Move the DML that saves opportunities outside the for loop.

D.

Use Database query to query the opportunities.

Question 7

A developer at AW Computing is tasked to create the supporting test class for a 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 _Structure__c records are available when the test class is executed?

Choose 2 answers

Options:

A.

Use a Test Date Factory class.

B.

Use the @TsTest (SeeAllData=true) annotation.

C.

Use the Test. leadteat{) method.

D.

Use without sharing on the class declaration.

Question 8

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.

Run the tests using the Run All Tests' method.

B.

Remove the failing test methods from the test class

C.

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

D.

Increase the test class coverage on the helper class.

Question 9

A business has a proprietary Order Management System (OMS) that creates orders from its website and fulfills the orders. When the order is created in the OMS, an integration also creates an order record inSalesforce 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.

The business notices that each update from the OMS creates a new order record in Salesforce.

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

Choose 2 answers

Options:

A.

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

B.

Ensure that the order number in the OMS is unique.

C.

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

D.

O Write a trigger on the Order object to delete the duplicates.

Question 10

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 11

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 12

Universal Containers wants to ensure that all new leads created in the system have a valid email address. They have already created a validation rule to enforce this requirement, but want to add an additional layer of validation using automation.

What would be the best solution for this requirement?

Options:

A.

Submit a REST API Callout with a JSON payload and validate the fields on a third party system

B.

Use a before-save Apex trigger on the Lead object to validate the email address and display an error message if it is invalid

C.

Use a custom Lightning Web component to make a callout to validate the fields on a third party system.

D.

Use an Approval Process to enforce the completion of a valid email address using an outbound message action.

Question 13

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 14

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 15

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.

The original record is loaded from the database.

B.

System validation is run for maximum field lengths.

C.

Old values are overwritten with the new record values.

D.

JavaScript validation is run in the browser,

Question 16

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

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

Options:

A.

Apex trigger on Task

B.

Task actions

C.

Auto-launched flow on Task

D.

Record-triggered flow on Opportunity

Question 17

The values 'High', 'Medium', and 'Low' are identified as common values for multiple picklists across different objects.

What is an approach a developer can take to streamline maintenance of the picklists and their values, while also restricting the values to the ones mentioned above?

Options:

A.

Create the Picklist on each object and use a Global Picklist Value Set containing the values.

B.

Create the Picklist on each object as a required field and select "Display values alphabetically, not in the order entered".

C.

Create the Picklist on each object and add a validation rule to ensure data integrity.

D.

Create the Picklist on each object and select "Restrict picklist to the values defined in the value set".

Question 18

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

Choose 2 answers

Options:

A.

Criteria-based sharing calculations

B.

Email messages

C.

Roll-up summary fields

D.

After-save record-triggered flow

Question 19

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 20

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

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

Options:

A.

Quick actions

B.

Approval process

C.

Account trigger

D.

Fast Field Updates record-triggered flow

Question 21

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

How can the Lightning component execute the query?

Options:

A.

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

B.

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

C.

Use the Salesforce Streaming APL to perform the SOQL query.

D.

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

Question 22

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

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

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

Options:

A.

static decimal DELIVERY_MULTIPLIER = 4.15;

B.

constant decimal DELIVERY_MULTIPLIER = 4.15;

C.

static final decimal DELIVERY_MULTIPLIER = 4.15;

D.

decimal DELIVERY_MULTIPLIER = 4.15;

Question 23

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

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

Choose 2 answers

Options:

A.

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

B.

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

C.

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

D.

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

Question 24

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

Options:

A.

import updateAccounts from "AccountControlles';

B.

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

C.

import updateAccounts from "Account@ontroller.updateAccounts';

D.

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

Question 25

A developer is designing a new application on the Salesforce platform and wants to ensure it can support multiple tenants effectively.

Which design framework should the developer consider to ensure scalability and maintainability?

Options:

A.

Waterfall Model

B.

Flux (view, action, dispatcher, and store)

C.

Model-View-Controller (MVC)

D.

Agile Development

Question 26

Universal Containers implemented a private sharing model for the Account object. A custom Account search tool was developed with

Apex to help sales representatives find accounts that match multiple criteria they specify. Since its release, users of the tool report they can see

Accounts they do not own.

What should the developer use to enforce sharing permissions for the currently logged in user while using the custom search tool?

Options:

A.

Use the with sharing keyword on the class declaration.

B.

Use the without sharing keyword on the class declaration.

C.

Use the userInfo Apex class to filter all SOQL queries to returned records owned by the logged-in user.

D.

Use the schema describe calls to determine if the logged-in user has access to the Account object.

Question 27

Universal Hiring uses Salesforce to capture job applications. A salesforce administrator created two custom objects; Job__c acting as the master object, to Application_c acting as the detail.

Within the Job__c object, a custom multi-select picklist, preferred _Locations__c, contains a list of approved states for the position. Each Job_Application__c record relates to a Contact within the system through a master-detail relationship.

Recruiters have requested the ability to view whether the Contact's Mailing State value matches a value selected on the Preferred Locations__c field, within the Job_Application__c record. Recruiters would like this value to be kept in sync if changes occur to the Contact's Mailing State.

What is the recommended tool a developer should use to meet the business requirement?

Options:

A.

Apex trigger

B.

Roll-up summary field

C.

Record-triggered flow

Question 28

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 development does not require Apex test classes.

B.

Declarative development has higher design limits and query limits,

C.

Declarative development can be done using the Setup menu.

D.

Declarative code logic does not require maintenance or review.

Question 29

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 30

A developer identifies the following triggers on the Expense _c object:

Question # 30

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.

Unity all three triggers In a single trigger on the Expense__c object that Includes all events.

B.

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

C.

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

D.

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

Question 31

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

Question # 31

Options:

A.

100

B.

0

C.

150

D.

500

Question 32

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

B.

Write a class that extends webserviceloo.

C.

Write a class that implements webservicemock.

D.

Write a class that extends HTTPcalloutMock.

Question 33

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 34

(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 35

(Full question statement)

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

Options:

A.

B.

C.

D.

Question 36

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 37

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.

Visual Studio Code IDE

C.

AppExchange

D.

Developer Console

Question 38

What is a considerations for running a flow in debug mode?

Options:

A.

When debugging a schedule-triggered flow, the flow starts only for one record.

B.

Clicking Pause allows an element to be replaced in the flow.

C.

DML operations will be rolled back when the debugging ends.

D.

Callouts to external are not when debugging a flow.

Question 39

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.

Implement pagination with a StandardSetController.

C.

Use JavaScript remoting with SOQL Offset.

D.

Use lazy loading and a transient List variable.

Question 40

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 41

Universal Containers wants to automatically assign new cases to the appropriate support representative based on the case origin. They have created a custom field on the Case object to store the support representative name.

What is the best solution to assign the case to the appropriate support representative?

Options:

A.

Use a trigger on the Case object.

B.

Use a formula field on the Case object.

C.

Use a validation rule on the Case object.

D.

Use an Assignment Flow element.

Question 42

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

Options:

A.

FIND ‘Universal Conteiners' IN CompenyName Fields RETURNING leadjid, name), sccount(ad, name}, conteact(id, name)

B.

SELECT Lead.id, Lead.Neme, Account,Id, Account.Neme, Contact.id, Contact.Neame FROM Lead, Account, Contact WHERE CompanyName = "Universal Containers*

C.

PIND ‘Universal Centainers’ IN Name Fields RETURNING lead(id, name), saceount(id, mame), contact (id, name)

D.

SELECT lead(id, name), account (id, name}, contact(id, name) FROM Lead, Account, Contact WHERE Name = "Universal Containers’

Question 43

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

Options:

A.

apex:page standardController="Notice_c" extensions="myControllerExtension"”

B.

apex:page controllers="Notice_c, myContcollerExtension"

C.

apex:pege=Notice extends="myControllerExtension”

D.

apex:page controller="Notice_c" extensions="myControllerExtension"

Question 44

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 Status page

B.

View the Apex Jobs page

C.

Query the AsyncApexJob object

D.

View the Apex Flex Queue

Question 45

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

Question # 45

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

Options:

A.

@isTest above line 03.

B.

Add @istest above line 01.

C.

Change public to private on line 01.

D.

Remove static from line 03.

Question 46

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.

Developer Sandbox

B.

Full Sandbox

C.

Developer Edition

D.

Partner Developer Edition

Question 47

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 48

When importing and exporting data into Salesforce, which two statements are true?

Choose 2 answers

Options:

A.

Bulk API can be used to bypass the storage limits when importing large data volumes in development environments.

B.

Data import wizard is an application that is installed on your computer

C.

Bulk APL can be used to import large data volumes in development environments without bypassing the storage limits.

D.

Developer and Developer Pro sandboxes have different storage limits.

Question 49

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 50

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 51

What is an example of a polymorphic lookup field in Salesforce?

Options:

A.

The Parentid field on the standard Account object

B.

A custom field, Link__c, on the standard Contact object that looks up to an Account or a Campaign

C.

The Whatld field on the standard Event object

D.

The LeadId and Contactid fields on the standard Campaign Member object

Question 52

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.

An Apex trigger on the Opportunity object

B.

An error condition formula on a validation rule on Opportunity

C.

A record trigger flow on the Opportunity object

D.

An approval process on the Opportunity object

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

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

Options:

A.

Renaming or replacing picklists

B.

updating addresses using Mass Address updated tool

C.

Importing data using the Data Loader and the Bulk API

D.

Converting Leads to Contacts

Question 55

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

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

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

Options:

A.

Screen-based flow

B.

Approval process

C.

Apex trigger

D.

Lightning Component

Question 56

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 # 56

B)

C)

D)

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Question 57

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 58

A developer has a single custom controller class that works with a Visualforce Wizard to support creating and editing multiple sObjects. 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.

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

B.

ApexPages.currentPage ().getParametera(}.put{'input', "TeatValue');

C.

insert pageret;

D.

public Extendedcontroller (ApexPages.Standardcontraller entrl) { }

E.

Test. setCurrentPage (pageRef) ;

Question 59

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

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 60

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

Choose 2 answers

Options:

A.

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

B.

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

C.

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

D.

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

Page: 1 / 20
Total 201 questions