New Year Special Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: 70special

Salesforce PDI Salesforce Certified Platform Developer 1 (WI25) Exam Practice Test

Page: 1 / 20
Total 200 questions

Salesforce Certified Platform Developer 1 (WI25) 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 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 2

While working in a sandbox, an Apex test fails when run in the Test Runner. However, executing the Apex logic in the Execute Anonymous window succeeds with no exceptions or errors.

Why did the method fail in the sandbox test framework but succeed in the Developer Console?

Options:

A.

The test method does not use system. runAs to execute as a specific user.

B.

The test method is calling an @future method.

C.

The test method relies on existing data in the sandbox.

D.

The test method has a syntax error in the code.

Question 3

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

Which two strategies can a developer use to accomplish this?

Choose 2 answers

Options:

A.

Use a validation rule.

B.

Use an auto-response rule.

C.

Use a before-save Apex trigger,

D.

Use an automatically launched Approval Process.

Question 4

A developer created this Apex trigger that calls MyClass.mystaticMethod:

The developer creates a test class with a test method that calls MyClass.myStaticMethod directly, resulting in 81% overall code coverage What happens when the developer tries to deploy the trigger and two classes to production, assuming no other code exists?

Options:

A.

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

B.

The deployment fails because no assertions were made in the test method.

C.

The deployment passes because the Apex code has the required >75% code coverage.

D.

The deployment fails because the Apex trigger has no code coverage.

Question 5

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 6

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.

Question 7

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?

A)

B)

C)

D)

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Question 8

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 9

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 10

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 11

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 12

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 13

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

Options:

A.

VS Code

B.

Execute Anonymous

C.

Salesforce CLI

D.

Developer Console

Question 14

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 15

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 16

A developer creates a custom exception as shown below:

public class ParityException extends Exception { }

What are two ways the developer can fire the exception in Apex?

Options:

A.

throw new ParityException ();

B.

throw new parityException ('parity does not match');

C.

new ParityException ();

D.

new ParityException('parity does not match');

Question 17

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 18

Which statement should be used to allow some of the records in a list of records to be inserted if others fail to be inserted?

Options:

A.

Database. insert (records, true)

B.

insert records

C.

insert (records, false)

D.

Database. insert (records, false)

Question 19

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 20

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 21

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 22

A company's engineering department is conducting a month-long test on the scalability of an in-house-developed software that requires a cluster of 100 or more servers. Which of the following models is the best to use?

Options:

A.

PaaS

B.

SaaS

C.

BaaS

D.

laaS

Question 23

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 24

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 25

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 26

Which Apex class contains methods to return the amount of resources that have been used for a particular governor, such as the number of DML statements?

Options:

A.

OrgLimits

B.

Limits

C.

Messaging

D.

Exception

Question 27

A developer has an integer variable called maxAttempts. The developer needs to ensure that once maxAttempts is initialized, it preserves its value for the length of the Apex transaction; while being able to share the variable's state between trigger executions.

How should the developer declare maxAttempts to meet these requirements?

Options:

A.

Declare maxattempts as a constant using the static and final keywords.

B.

Declare maxattempts as a member variable on the trigger definition.

C.

Declare maxattempts as a variable on a helper class.

D.

Declare maxAttempts as a private static variable on a helper class.

Question 28

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 29

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.

Formula field

B.

Record-triggered flow

C.

Roll-up summary field

D.

Apex trigger

Question 30

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 31

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 32

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 33

Universal Containers (UC) uses a custom object called Vendor. The Vendor custom object has a master-detail relationship with the standard Account object.

Based on some internal discussions, the UC administrator tried to change the master-detail relationship to a lookup relationship, but was not able to do so.

What is a possible reason that this change was not permitted?

Options:

A.

Some of the Vendor records have null for the Account field.

B.

The Account object has a roll up summary field on the Vendor object.

C.

The Account object does not allow changing a field type for a custom field.

D.

The organization wide default for the Vendor object is Public Read/Write.

Question 34

Which three steps allow a custom Scalable Vector Graphic (SVG) to be included in a Lightning web component?

Choose 3 answers

Options:

A.

Import the static resource and provide a JavaScript property for it.

B.

Upload the SVG as a static resource.

C.

Reference the import in the HTML template.

D.

Import the SVG as a content asset file.

E.

Reference the property in the HTML template.

Question 35

Refer to the following Apex code:

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

Options:

A.

0

B.

1

C.

2

D.

4

Question 36

What can be used to override the Account's standard Edit button for Lightning Experience?

Options:

A.

Lightning action

B.

Lightning page

C.

Lightning component

D.

Lightning flow

Question 37

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 38

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 39

Which two statements are true about using the @testSetup annotation in an Apex test class?

Choose 2 answers

Options:

A.

Records created in the test setup method cannot be updated in individual test methods.

B.

In a test setup method, test data is inserted once and made available for all test methods In the test class.

C.

A method defined with the @testSetup annotation executes once for each test method in the test class and counts towards system limits.

D.

The @testSetup annotation is not supported when the @isTest(SeeAllData=True) annotation is used .

Question 40

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 41

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?

A)

B)

C)

D)

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Question 42

A developer deployed a trigger to update the status__c of Assets related to an Account when the Account’s status changes and a nightly integration that updates Accounts in bulk has started to fail with limit failures.

What should the developer change about the code to address the failure while still having the code update all of the Assets correctly?

Options:

A.

Move all of the logic to a Queveable class that queries for and updates the Assets and call it from the trigger.

B.

Add List assets = [SELECT id, Status_¢ FROM WHERE AccountId = : acctId] to line 14 and iterate over the assets list in the for loop on line 15.;

C.

Add a LIMIT clause to the SOQL query on line 16 to limit the number of Assets queried for an Account.

D.

Change the getAssetsToUpdate method to process all Accounts in one call and call it outside of the for loop that starts on line 03.

Question 43

When the code executes, a DML exception is thrown.

How should a developer modify the code to ensure exceptions are handled gracefully?

Options:

A.

Implement the upset DML statement.

B.

Implement Change Data Capture.

C.

Implement a try/catch block for the DML.

D.

Remove null items from the list of Accounts.

Question 44

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 45

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

Choose 2 answers

Options:

A.

Control

B.

default

C.

Buddle

D.

Emit

Question 46

What are two benefits of using External IDs?

Choose 2 answers

Options:

A.

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

B.

An External ID can be a formula field ta 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 1D is indexed and can improve the performance of SOOL queries.

Question 47

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 48

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.

Formula field

C.

Apex trigger

D.

Quick action

Question 49

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.

Question 50

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 51

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 52

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 53

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 54

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

Options:

A.

B.

C.

D.

Question 55

A software company is using Salesforce to track the companies they sell their software to in the Account object. They also use Salesforce to track bugs in their software with a custom object, Bug__c.

As part of a process improvement initiative, they want to be able to report on which companies have reported which bugs. Each company should be able to report multiple bugs and bugs can also be reported by multiple companies.

What is needed to allow this reporting?

Options:

A.

Roll-up summary field of Bug_c on Account

B.

Master-detail field on Bug_c to Account

C.

Lookup field on Bug_c to Account

D.

Function object between Bug__c and Account

Question 56

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

Options:

A.

fire()

B.

SegdetesEvent (}

C.

FireEvent()

D.

emit()

Page: 1 / 20
Total 200 questions