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

Salesforce PDI 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

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

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

Options:

A.

Total number of SOOL quires issued

B.

Total number of DML statements issued

C.

Total number of records processed as a result of DML statements

Question 2

Managers at Universal Containers want to ensure that only decommissioned containers are able to be deleted in the system. To meet the business requirement a Salesforce developer adds "Decommissioned" as a picklist value for the Status _c custom field within the Container _c object.

Which two approaches could a developer use to enforce only Container records with a status of "Decommissioned" can be deleted?

Choose 2 answers

Options:

A.

Before record-triggered flaw

B.

Apex trigger

C.

After record-triggered flow

D.

Validation rule

Question 3

Which two characteristics are true for Lightning Web Component custom events?

Choose 2 answers

Options:

A.

Data may be passed in the payload of a custom event using @wire decorated properties.

B.

Data may be passed In the payload of a custom event using a property called detail.

C.

By default a custom event only propagates to its immediate container and to its immediate child component.

D.

By default a custom event only propagates to it’s immediate container.

Question 4

For which three items can a trace flag be configured?

Choose 3 answers

Options:

A.

Apex Class

B.

Flow

C.

User

D.

Visualforce

E.

Apex Trigger

Question 5

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 6

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 7

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?

Options:

A.

apex

CopyEdit

trigger RequestTrigger on Request__c (before insert) {

RequestLogic.validateRecords(Trigger.new);

}

B.

apex

CopyEdit

trigger RequestTrigger on Request__c (before insert) {

RequestLogic.validateRecords(trigger.new);

}

C.

apex

CopyEdit

trigger RequestTrigger on Request__c (before insert) {

if (RequestLogic.isValid(Request__c)) {

Request.addError('Your request cannot be created at this time.');

}

}

D.

apex

CopyEdit

trigger RequestTrigger on Request__c (after insert) {

if (RequestLogic.isValid(Request__c)) {

Request.addError('Your request cannot be created at this time.');

}

}

Question 8

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

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

Options:

A.

@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 9

Where are two locations a developer can look to find information about the status of batch or future methods?

Choose 2 answers

Options:

A.

Developer Console

B.

Apex Jobs

C.

Paused Flow Interviews component

D.

Apex Flex Queue

Question 10

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-level permissions on Salary__c?

Options:

A.

html

CopyEdit

B.

html

CopyEdit

C.

html

CopyEdit

D.

html

CopyEdit

Question 11

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 12

Which three resources in an Aura component can contain JavaScript functions?

Choose 3 answers

Options:

A.

Style

B.

Renderer

C.

Controller

D.

Design

E.

Helper

Question 13

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 14

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.

accountRec, isDeletable()

B.

Schema,sObjectType,Account, isDeletable ()

C.

accuntRec, sObjectType,isDeletable()

D.

Account,isDeleteable

Question 15

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 16

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

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 cade 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 18

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

Options:

A.

Sandbox

B.

Environment Hub

C.

Production

D.

Dev Hub

Question 19

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

Choose 3 answers

Options:

A.

One-time loading for duplicate scripts

B.

Loading scripts in parallel

C.

Loading Files from Documents

D.

Specifying loading order

E.

Loading externally hosted scripts

Question 20

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 21

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 22

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:

ist performSearch (String lastName} [

return Database.query('SELECT Id, FirstName, LastName FROM Contact WHERE LastName Like

s'+lastName+'s'")?;

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

Choose 2 answers

Options:

A.

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

B.

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

C.

Use the ¢Readonly annotation and the with sharing keyword on the class.

D.

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

Question 23

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 24

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 25

Universal Containers (UC) wants to lower its shipping cost while making the shipping process more efficient. The Distribution Officer advises UC to implement global addresses to allow multiple Accounts to share a default pickup address. The developer is tasked to create the supporting object and relationship for this business requirement and uses the Setup Menu to create a custom object called "Global Address".

Which field should the developer add to create the most efficient model that supports the business need?

Options:

A.

Add a master-detail field on the Global Address object to the Account object.

B.

Add a lookup field on the Global Address object to the Account object.

C.

Add a lookup field on the Account object to the Global Address object.

D.

Add a master-detail field on the Account object to the Global Address object.

Question 26

A developer wants to improve runtime performance of Apex calls by caching results on the client.

What is the most efficient way to implement this and follow best practices?

Options:

A.

Decorate the server-side method with @AuraEnabled(cacheable=true).

B.

Call the setStorable() method on the action in the JavaScript client-side code.

C.

Decorate the server-side method with @AuraEnabled(storable=true).

D.

Set a cookie in the browser for use upon return to the page.

Question 27

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 28

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 29

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 30

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 31

The sales management team at Universal Containers requires that the Lead Source field of the Lead record be populated when a Lead is converted What should be done to ensure that a user populates the Lead Source field prior to converting a Lead?

Options:

A.

Create an after trigger on Lead.

B.

Use Lead Conversion field mapping.

C.

Use a formula field.

D.

Use a validation rule.

Question 32

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

Choose 3 answers.

Options:

A.

$Lightning.use

B.

$Lightning.useComponent

C.

D.

E.

$Lightning.createComponent

Question 33

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 34

Universal Containers is developing a new Lightning web component for their marketing department. They want to ensure that the component is fine-tuned and provides a seamless user experience.

What are some benefits of using the Lightning Component framework?

Options:

A.

Better performance due to client-side rendering

B.

Automatic support for accessibility standards

C.

Compatibility with all web browsers

D.

Easy integration with third-party libraries

Question 35

Which two are phases in the Aura application event propagation framework?

Choose 2 answers

Options:

A.

Control

B.

default

C.

Buddle

D.

Emit

Question 36

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 37

Universal Containers decides to use exclusively declarative development to build out a new Salesforce application.

Which three options should be used to build out the database layer for the application?

Choose 3 answers

Options:

A.

Custom objects and fields

B.

Triggers

C.

Roll-up summaries

D.

Relationships

E.

Flows

Question 38

Universal Containers wants to back up all of the data and attachments in its Salesforce org once a month.

Which approach should a developer use to meet this requirement?

Options:

A.

Schedule a report.

B.

Use the Data Loader command line.

C.

Define a Data Export scheduled job.

D.

Create a Schedulable Apex class.

Question 39

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

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

Options:

A.

@InvocableMethod(label='Additional Info') public ContactInfo getInfo(Id contactId) { /* implementation */ }

B.

@InvocableMethod(label='Additional Info') public static List getInfo(List contactIds) { /* implementation */ }

C.

@InvocableMethod(label='Additional Info') public static ContactInfo getInfo(Id contactId) { /* implementation */ }

D.

@InvocableMethod(label='Additional Info') public List getInfo(List contactIds) { /* implementation */ }

Question 40

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 41

Which scenario is valid for execution by unit tests?

Options:

A.

Execute anonymous Apex as a different user.

B.

Generate a Visualforce PDF with getcontentaAsPDF ().

C.

Load data from a remote site with a callout.

D.

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

Question 42

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

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

Options:

A.

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 43

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.

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 44

Given the following Anonymous block:

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

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

Options:

A.

The transaction will succeed and changes will be committed.

B.

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

C.

The transaction will fail due to exceeding the governor limit.

D.

The try-catch block will handle any DML exceptions thrown,

Question 45

A developer needs to confirm that a Contact trigger works correctly without changing the organization's data.

What should the developer do to test the Contact trigger?

Options:

A.

Use Deploy from the VSCode IDE co deploy an 'insert Contact' Apex class.

B.

Use the New button on the Salesforce Contacts Tab to create a new Contact record.

C.

Use the Test menu on the Developer Console to run oil test classes for the Contact trigger.

D.

Use the Open Execute Anonymous feature on the Developer Console to run an "insert Contact' DML statement.

Question 46

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 47

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

Options:

A.

100

B.

0

C.

150

D.

500

Question 48

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 49

(Full question statement)

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

Options:

A.

B.

C.

D.

Question 50

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

A developer creates a Lightning web component that imports a method within an Apex class. When a Validate button is pressed, the method runs to execute complex validations.

In this implementation scenario, which two options are.. of the Controller according to the MVC architecture?

Choose 2 answers

Options:

A.

HTML file

B.

Apex class

C.

JavaScript file

D.

XML file

Question 52

Which two actions may cause triggers to fire?

Choose 2 answers

Options:

A.

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

B.

Updates to FeedItem

C.

Cascading delete operations

D.

Renaming or replacing a picklist entry

Question 53

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 54

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

Choose 3 answers

Options:

A.

Only one method using the @invecableMethod annotation can be defined per Apex class_

B.

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

C.

A method using the @invocablemethod annotation must be declaredas static,

D.

GO A method using the @invocablemethod annotation must define a return value.

E.

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

Question 55

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

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.

Lightning Data Service ignores field-level security.

B.

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

C.

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

D.

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

Question 56

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

Engineering Support c.

Users should be able to associate multiple Engineering Support __c records to a single Opportunity record. Additionally, aggregate information

about the Engineering Support _c records should be shown on the Opportunity record.

Which relationship field should be implemented to support these requirements?

Options:

A.

Lookup field from Opportunity to Engineering _support__c

B.

Master-detail field from Engineering Support__c to Opportunity

C.

Master-detail field from Opportunity to Engineering Support__c

D.

Lookup field from Engineering Support __c to Opportunity

Question 57

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

Developer sandboxes.

B.

Full Copy sandboxes

C.

Developer orgs

D.

Scratch orgs

Question 58

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 59

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.

Validation rules

B.

Apex triggers

C.

Record triggered flows

D.

Quick Actions

Question 60

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 61

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

Choose 2 answers

Options:

A.

All custom objects must have visibility set to a value other than in Development.

B.

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

C.

All triggers must have some test coverage

D.

All Visual flows must have at least 1% test coverage.

Page: 1 / 20
Total 204 questions