Black Friday Special 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: save70

Free and Premium Salesforce PDI Dumps Questions Answers

Page: 1 / 13
Total 174 questions

Salesforce Certified Platform Developer I (SU24) Questions and Answers

Question 1

What does the Lightning Component framework provide to developers?

Options:

A.

Prebuilt components that can be reused

B.

Support for Classic and Lightning Uls

C.

Extended governor limits for applications

D.

Templates to create custom components

Buy Now
Question 2

A developer created a custom order management app that uses an Apex class. The order is represented by an Order object and an Orderltem object that has a master-detail relationship to Order. During order processing, an order may be split into multiple orders.

What should a developer do to allow their code to move some existing Orderltem records to a new Order record?

Options:

A.

Create a junction object between OrderItem and Order.

B.

Select the Allow reparenting option on the master-detail relationship.

C.

Change the master-detail relationship to an external lookup relationship.

D.

Add without sharing to the Apex class declaration.

Question 3

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

Salesforce Certified Platform Developer I

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.

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

B.

Lightning Data Service ignores field-level security.

C.

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

D.

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

Question 4

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 2 answers

A)

B)

C)

D)

E)

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

E.

Option E

Question 5

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

Choose 2 answers

Options:

A.

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

B.

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

C.

The Apex governor limits will use the asynchronous limit levels.

D.

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

Question 6

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.

3

Question 7

Given the following Apex statement:

What occurs when more than one Account is returned by the SOQL query?

Options:

A.

The query fails and an error is written to the debug log.

B.

An unhandled exception is thrown and the code terminates.

C.

The variable, myaccount, is automatically cast to the List data type.

D.

The first Account returned is assigned to myAccount,

Question 8

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.

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

B.

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

C.

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

D.

Use the Salesforce Streaming API to perform the SOQL query.

Question 9

A developer needs to have records with specific field values in order to test a new Apex class.

What should the developer do to ensure the data is available to the test?

Options:

A.

Use test.loadData() and reference a JSON file in Documents.

B.

Use Test.loadData() and reference a CSV file in a static resource.

C.

Use Anonymous Apex to create the required data.

D.

Use SOQL to query the org for the required data.

Question 10

A developer completed modifications to a customized feature that is comprised of two elements:

* Apex trigger

* Trigger handler Apex class

What are two factors that the developer must take into account to properly deploy the modification to the production environment?

Choose 2 answers

Options:

A.

All methods in the test classes must use @isTest.

B.

Apex classes must have at least 75% code coverage org-wide.

C.

Test methods must be declared with the testMethod keyword.

D.

At least one line of code must be executed for the Apex trigger.

Question 11

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

Options:

A.

Renderer

B.

Controller

C.

style

D.

Helper

E.

Design

Question 12

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

Choose 2 answers

Options:

A.

Use a Test Data Factory class.

B.

Use the Test.loadTesc() method.

C.

Use the @T=Test (SeefAllDaca=rru=) annotation.

D.

Use without sharing on the class declaration.

Question 13

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

Choose 3 answers

Options:

A.

Only one method using the @InvocableMethod annotation can be defined per Apex class.

B.

A method using the @InvocableMathod annotation must define a return value,

C.

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

D.

A method using the @InvocablsMethod annotation must be declared as static.

E.

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

Question 14

In the following example, which sharing context will myMethod execute when it is invoked?

Options:

A.

Sharing rules will be inherited from the calling context.

B.

Sharing rules will not be enforced for the running user.

C.

Sharing rules will be enforced by the instantiating class.

D.

Sharing rules will be enforced for the running user.

Question 15

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 approval process on the Opportunity object

B.

A record trigger flow on the Opportunity object

C.

An Apex trigger on the Opportunity object

D.

An error condition formula on a validation rule on Opportunity

Question 16

Which two are best practices when it comes to Aura component and application event handling?

Choose 2 answers

Options:

A.

Try to use application events as opposed to component events.

B.

Use component events to communicate actions that should be handled at the application level.

C.

Handle low-level events in the event handler and re-fire them as higher-level events.

D.

Reuse the event logic in a component bundle, by putting the fogic in the helper.

Question 17

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.

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

B.

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

C.

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

D.

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

Question 18

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.

Apex trigger

B.

Roll-up summary field

C.

Formula field

D.

Record-triggered flow

Question 19

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.

Apex trigger

B.

validation rule

C.

After record-triggered flow

D.

Before record-triggered flow

Question 20

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

Choose 3 answers

Options:

A.

Setup Menu

B.

Tooling API

C.

Metadata API

D.

Salesforce DX

E.

Bulk APL

Question 21

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.

The validation rules will cause the trigger to fire again,

C.

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

D.

The trigger may fire multiple times during a transaction.

Question 22

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 code 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 23

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.

Use Opportunity.SObjectType.gethescribe () .getRaecordlypaInsos () to get a list of record types, and iterate through them until 2sDefaultRecordTypeMapping () is true.

B.

Query the Profile where the ID equals uzexInfo.getProfilelD () and then use the profile.Cpportunity.gesDefaultRecordTyp= () method.

C.

Use the Schema.userInfo.Cpportunity.getlefaultRecordIype () method.

D.

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

Question 24

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

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

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

Options:

A.

5

B.

6

C.

10

D.

15

Question 25

A custom picklist field, Food _Preference_ c, exists on a custom object. The picklist contains the following options: 'Vegan', 'Kosher', 'No Preference'. The developer must ensure a value is populated every time a record is created or updated.

What is the optimal way to ensure a value is selected every time a record is saved?

Options:

A.

Mark the field as Required on the object's page layout.

B.

Set "Use the first value in the list as the default value” to True.

C.

Mark the field as Required on the field definition.

D.

Write an Apex trigger to ensure a value is selected.

Question 26

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 Import Wizard does not support Opportunities.

B.

Data Loader automatically relates Opportunities to Accounts.

C.

Data Loader runs from the developer's browser,

D.

Data Import Wizard can not import all 500 records.

Question 27

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

Options:

A.

Lightning component

B.

Lightning action

C.

Lightning flow

D.

Lightning page

Question 28

What is the value of the Trigger.old context variable in a before insert trigger?

Options:

A.

list of newly created sObjects without IDs

B.

Undefined

C.

null

D.

An empty list of sObjects

Question 29

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

Options:

A.

VS Code

B.

Developer Console

C.

Execute Anonymous

D.

Salesforce CLI

Question 30

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 Flex Queue

C.

Apex Jobs

D.

Paused Flow Interviews component

Question 31

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 2 master-detail field on the Account object to the Global Address object.

B.

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

C.

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

D.

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

Question 32

A developer considers the following snippet of code:

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

Options:

A.

1

B.

2

C.

4

D.

3

Question 33

Which exception type cannot be caught?

Options:

A.

NoAccessException

B.

LimitException

C.

CalloutException

D.

A custom exception

Question 34

What Is the result of the following code snippet?

Options:

A.

Accounts are inserted.

B.

Account is inserted.

C.

200 Accounts are inserted,

D.

201 Accounts are inserted.

Question 35

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

Options:

A.

100

B.

0

C.

500

D.

150

Question 36

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.

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

B.

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

C.

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

D.

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

Question 37

A business has a proprietary Order Management System (QMS) 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?

Options:

A.

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

B.

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

C.

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

D.

Ensure that the order number in the OMS is unique.

Question 38

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.

External ID is indexed and can improve the performance of SOQL queries.

C.

An External ID can be used with Salesforce Mobile to make external data visible.

D.

An External ID can be a formula field to help create a unique key from two fields in Salesforce.

Question 39

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.

Lightning Component

C.

Approval process

D.

Apex trigger

Question 40

A developer needs to allow users to complete a form on an Account record that will create record for a custom object.

The form needs to display different fields depending on the user’s job role. The functionality should only be available to a small group of users.

Which three things should the developer do to satisfy these requirements?

Choose 3 answers

Options:

A.

Create a Custom Permission for the users.

B.

Create a Lightning web component,

C.

Add a Dynamic Action to the Account Record Page.

D.

Add a Dynamic Action to the Users' assigned Page Layouts,

E.

Create a Dynamic Form.

Question 41

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 MAX Roll-Up Summary field on the latest availability date fields.

B.

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

C.

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

D.

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

Question 42

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

Choose 2 answers

Options:

A.

After-save record-triggered flow

B.

Criteria-based sharing calculations

C.

Email messages

D.

Roll-up summary fields

Question 43

Which statement generates a list of Leads and Contacts that have a field with the phrase 'ACME'?

A)

B)

C)

D)

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Question 44

Cloud Kicks Fitness, an ISV Salesforce partner, is developing a managed package application. One of the application modules allows the user to calculate body fat

using the Apex class, BodyFat, and its method, calculateBodyFat (). The product owner wants to ensure this method is accessible by the consumer of the application when

developing customizations outside the ISV's package namespace.

Which approach should a developer take to ensure calculateBodyFat () is accessible outside the package namespace?

Options:

A.

Declare the class as global and use the public access modifier on the method.

B.

Declare the class and method using the global access modifier.

C.

Declare the class and method using the public access modifier.

D.

Declare the class as public and use the global access modifier on the method.

Question 45

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?

A)

B)

C)

D)

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Question 46

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.

Unify all three triggers in a single trigger on the expense__c object that includes all events.

B.

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

C.

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

D.

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

Question 47

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.

Define a Data Export scheduled

C.

Use the Data Loader command line.

D.

Create a Schedulable Apex class.

Question 48

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:

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

Choose 2 answers

Options:

A.

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

B.

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

C.

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

D.

Use the @Readonly annotation and the with sharing keyword on the class

Question 49

A software company uses the following objects and relationships:

* Case: to handle customer support issues

* Defect__c: a custom object to represent known issues with the company's software

* Case_Defect__c: a junction object between Case and Defect__c to represent that a defect is a cause of a customer issue

Case and Defect__c have Private organization-wide defaults.

What should be done to share a specific Case_Defect__c record with a user?

Options:

A.

share the parent Defect__c record.

B.

Share the parent Case record.

C.

Share the parent Case and Defect_c records.

D.

Share the Case_Defect_c record.

Question 50

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.

Junction object between Bug_c and Account

B.

Master-detail field on Bug__c to Account

C.

Lookup field on sug_c to Account

D.

Roll-up summary field of Bug__c on Account

Question 51

An org has an existing flow that edits an Opportunity with an Update Records element. A developer must update the flow to also create a Contact and store the created Contact’s ID on the Opportunity.

Which update must the developer make in the flow?

Options:

A.

Add a new Update Records element.

B.

Add a new Get Records element.

C.

Add a new Roll Back Records element.

D.

Add a new Create Records element.

Question 52

Consider the following code snippet for a Visualforce page that is launched using a Custom Button on the Account detail page layout.

When the Save button is pressed the developer must perform a complex validation that involves multiple objects and, upon success, redirect the user to another Visualforce

page.

What can the developer use to meet this business requirement?

Options:

A.

Controller extension

B.

Custom controller

C.

Apex trigger

D.

Validation rule

Page: 1 / 13
Total 174 questions