Winter Special Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: dumps65

Salesforce PDI Dumps

Page: 1 / 20
Total 200 questions

Salesforce Certified Platform Developer 1 (WI25) Questions and Answers

Question 1

A developer created a child Lightning web component nested inside a parent Lightning web component. The parent component needs to pass a string value to the child component.

In which two ways can this be accomplished?

Choose 2 answers

Options:

A.

The parent component can invoke a public method in the child component.

B.

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

C.

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

D.

The parent component can use a custom event to pass the data to the child component.

Question 2

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 3

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 4

A development team wants to use a deployment script to automatically deploy to a sandbox during their development cycles.

Which two tools can they use to run a script that deploys to a sandbox?

Choose 2 answers

Options:

A.

SFDX CLI

B.

Developer Console

C.

Change Sets

D.

Ant Migration Tool

Question 5

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)

as

B)

as

C)

as

D)

as

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Question 6

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 7

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 8

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)

as

B)

as

C)

as

D)

as

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Question 9

A developer needs to prevent the creation of Request _c records when certain conditions exist in the system. A BequestLogic class exists that checks the conditions.

What is the correct implementation?

A)

as

B)

as

C)

as

D)

as

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Question 10

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 11

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 12

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 13

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 14

A developer wants to get access to the standard price book in the org while writing a test class that covers an OpportunityLineltem trigger.

Which method allows access to the price book?

Options:

A.

Use Test .getStandardPricebookid() to get the standard price book ID.

B.

Use @isTest [SeeAllData=true| and delete the existing standard price book.

C.

Use @Testvisible to allow the test method to see the standard price book.

D.

Use Test. loadData () and a static resource to load a standard price book.

Question 15

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 in Salesforce and relates it to the contact as identified by the email on the order. As the order goes through different stages in the OMS, the integration also updates it in Salesforce.

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 16

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 17

What are two ways for a developer to execute tests in an org?

Choose 2 answers

Options:

A.

Tooling API

B.

Metadata API

C.

Bulk API

D.

Developer Console

Question 18

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 19

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

Options:

A.

B.

C.

D.

Question 20

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

as

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 21

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 22

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 23

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 24

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)

as

B)

as

C)

as

D)

as

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Question 25

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 26

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 27

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

as

Options:

A.

100

B.

0

C.

150

D.

500

Question 28

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?

A)

as

B)

as

C)

as

D)

as

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Question 29

A developer wants to import 500 Opportunity records into a sandbox.

Why should the developer choose to use Data Loader instead of Data Import Wizard?

Options:

A.

Data Loader automatically relates Opportunities to Accounts.

B.

Data Loader runs from the developer's browser.

C.

Data Import Wizard does not support Opportunities.

D.

Data Import Wizard can not import all 500 records,

Question 30

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 31

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 32

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 33

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 34

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 35

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 36

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 37

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)

as

B)

as

C)

as

D)

as

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Question 38

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 39

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 40

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 41

Refer to the component code 9f\d requirements below:

as

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 end and tablets?

A)

as

B)

as

C)

as

Options:

A.

Option A

B.

Option B

C.

Option C

Question 42

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

as

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

control.

C.

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

sensitive 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

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 46

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 47

Provide question feedback here (optional):

as

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

Options:

A.

4

B.

1

C.

2

D.

3

Question 48

The following Apex method is part of the ContactService class that is called from a trigger:

as

How should the developer modify the code to ensure best practices are met?

A)

as

B)

as

C)

as

D)

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Question 49

What should be used to create scratch orgs?

Options:

A.

Salesforce CLI

B.

Sandbox refresh

C.

Developer Console

D.

Workbench

Question 50

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 51

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

Question 52

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

Choose 2 answers

Options:

A.

B.

$LightningcreateComponent

C.

$Lightning,use

D.

E.

#Lightning,useComponent

Question 53

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 54

A developer considers the following snippet of code:

as

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

Options:

A.

1

B.

2

C.

3

D.

4

Question 55

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 56

A developer created a new after insert trigger on the Lead object that creates Task records for each Lead.

After deploying to production, an existing outside integration that inserts Lead records in batches to Salesforce is occasionally reporting total batch failures being caused by the Task insert statement. This causes the integration process in the outside system to stop, requiring a manual restart.

Which change should the developer make to allow the integration to continue when some records in a batch cause failures due to the Task

insert statement, so that manual restarts are not needed?

Options:

A.

Use the Database method with allow one set to false.

B.

Deactivate the trigger before the integration runs.

C.

Remove the Apex class from the integration user's profile.

D.

Use a try-catch block after the insert statement.

Question 57

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 58

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 59

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.

Page: 1 / 20
Total 200 questions