Winter Special Flat 65% Limited Time Discount offer - Ends in 0d 00h 00m 00s - Coupon code: netdisc

Salesforce PDI Salesforce Certified Platform Developer I (SU24) Exam Practice Test

Page: 1 / 17
Total 174 questions

Salesforce Certified Platform Developer I (SU24) Questions and Answers

Testing Engine

  • Product Type: Testing Engine
$42  $119.99

PDF Study Guide

  • Product Type: PDF Study Guide
$36.75  $104.99
Question 1

Which scenario is valid for execution by unit tests?

Options:

A.

Load data from a remote site with a callout.

B.

Execute anonymous Apex as a different user,

C.

Generate a Visualforce PDF with getContentASPDF

D.

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

Question 2

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 3

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.

Include on the Visualforce page.

B.

Use a try/catch with a custom exception class.

C.

Add custom controller attributes to display the message.

D.

Perform the DML using the patabase.upsert () method.

Question 4

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

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

Options:

A.

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

B.

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

C.

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

D.

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

Question 5

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 failure due to the Task insert statement, so that manual restarts are not needed?

Options:

A.

Deactivate the trigger before the integration runs.

B.

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

C.

Use a try-catch block after the insert statement,

D.

Use the Database method with allOrNone set to false.

Question 6

A developer creates a new Apex trigger with a helper class, and writes a test class that only exercises 95% coverage of the new Apex helper class.

Change Set deployment to production fails with the test coverage warning:

"Test coverage of selected Apex Trigger is 0%, at least 1% test coverage is required."

What should the developer do to successfully deploy the new Apex trigger and helper class?

Options:

A.

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

B.

Increase the test class coverage on the helper class.

C.

Remove the failing test methods from the test class.

D.

Run the tests using the 'Run All Tests’ method.

Question 7

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 8

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 9

A developer creates a batch Apex job to update a large number of records, and receives reports of the job timing out and not completing.

What is the first step towards troubleshooting the issue?

Options:

A.

Disable the batch job and recreate it with a smaller number of records.

B.

Check the debug logs for the batch job.

C.

Decrease the batch size to reduce the load on the system.

D.

Check the asynchronous job monitoring page to view the job status and logs.

Question 10

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 code logic does not require maintenance or review.

B.

Declarative development has higher design limits and query limits.

C.

Declarative development does not require Apex test classes.

D.

Declarative development can be done using the Setup menu.

Question 11

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

Options:

A.

throw new ParityException() ;

B.

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

C.

throw new ParityException ('parity docs not match');

D.

new ParityExcaption () ;

Question 12

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

Choose 2 answers

Options:

A.

Bubble

B.

Control

C.

Default

D.

Emit

Question 13

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 14

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.

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

B.

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

C.

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

D.

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

Question 15

developer must provide custom user interfaces when users edit a Contact 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 component in Lightning Experience

D.

A Visualforce page in Salesforce Classic and a Lightning page In Lightning Experience

Question 16

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 17

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

Choose 3 answers

Options:

A.

Specifying loading order

B.

One-time loading for duplicate scripts

C.

Loading files from Documents

D.

Loading externally hosted scripts

E.

Loading scripts in parallel

Question 18

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

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

A)

B)

C)

D)

Options:

A.

Option A

B.

Option

C.

Option

D.

Option

Question 19

In terms of the MVC paradigm, what are two advantages of implementing the view layer of a Salesforce application using Lightning Web Component-based

development over Visualforce?

Choose 2 answers

Options:

A.

Self-contained and reusable units of an application

B.

Log capturing via the Debug Logs Setup page

C.

Rich component ecosystem

D.

Built-in standard and custom set controllers

Question 20

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 21

Universal Containers recently transitioned from Classic to Lightning Experience.

One of its business processes requires certain values from the Opportunity cbject to be sent via an HTTP REST callout to its external order management system when the user presses a custom button

on the Opportunity detail page. Example values are as follows:

* Name

* Amount

* Account

Which two methods should the developer implement to fulfill the business requirement?

Choose 2 answers

Options:

A.

Create a Remote Action on the Opportunity object that executes an Apex immediate action to perform the HTTP REST callout whenever the Opportunity Is updated.

B.

Create a custom Visualforce quick action that performs the HTTP REST callout, and use a Visualforce quick action to expose the component on the Opportunity detail page.

C.

Create a Lightning component quick action that performs the HTTP REST callout, and use a Lightning Action to expose the component on the Opportunity detail page.

D.

Create an after update trigger on the Opportunity object that calls a helper method using @Future (Callour=true) to perform the HTTP REST callout.

Question 22

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 23

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 24

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 25

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.

Remove static from line 03.

B.

Add @IsTest above line 03.

C.

Change public to private on line 01.

D.

Add @1sTest above line 01.

Question 26

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 is calling an @future method.

B.

The test method relies on existing data in the sandbox.

C.

The test method has a syntax error in the code.

D.

The test method does not use Sysetem.runas= to execute as a specific user.

Question 27

As part of new feature development, a developer Is asked to build a responsive application capable of responding to touch events, that will be executed on stateful clients.

Which two technologies are built on a framework that fully supports the business requirement?

Choose 2 answers

Options:

A.

Aura Components

B.

Visualforce Pages

C.

Lightning Web Components

D.

Visualforce Components

Question 28

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 29

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.

Full Copy sandboxes

B.

Developer orgs

C.

Developer sandboxes

D.

Scratch orgs

Question 30

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 31

Universal Containers has an order system that uses an Order Number to identify an order for customers and service agents. Order records will be imported into Salesforce.

How should the Order Number field be defined in Salesforce?

Options:

A.

Direct Lookup

B.

Lookup

C.

External ID and Unique

D.

Indirect Lookup

Question 32

What Is the result of the following code?

Options:

A.

The record will not be created and an exception will be thrown.

B.

The record will be created and no error will be reported,

C.

The record will not be created and no error will be reported.

D.

The record will be created and a message will be in the debug log.

Question 33

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 34

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

Options:

A.

The Parentld field on the standard Account object

B.

The Leadld and Contactld fields on the standard Campaign Member object

C.

The Whatld field on the standard Event object

D.

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

Question 35

Universal Containers is building a recruiting app with an Applicant object that stores information about an individual person and a Job object that represents a job. Each applicant may apply for more than one job.

What should a developer implement to represent that an applicant has applied for a job?

Options:

A.

Master-detail field from Applicant to Job

B.

Junction object between Applicant and Job

C.

Formula field on Applicant that references Job

D.

Lookup field from Applicant to Job

Question 36

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 37

Universal Containers (UC) processes orders in Salesforce in a custom object, ord=xr <. 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 an Qfuture method 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 a Queueable class called from a trigger

Question 38

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

Options:

A.

Developer and Developer Pro sandboxes have different storage limits.

B.

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

C.

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

D.

Data import wizard is an application that is instalied on your computer.

Question 39

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 40

A developer needs to implement a custom SOAP Web Service that is used by an external Web Application. The developer chooses to include helper methods that are not used by the Web Application in the implementation of the Web Service Class.

Which code segment shows the correct declaration of the class and methods?

A)

B)

C)

D)

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Question 41

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.

Quick Actions

B.

Validation rules

C.

Record triggered flows

D.

Apex triggers

Question 42

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

B)

C)

D)

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Question 43

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 44

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

Choose 2 answers

Options:

A.

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

B.

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

C.

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

D.

The ©testSetup annotation is not supported when the cg5lsTest(SeeAIIData=True) annotation is used.

Question 45

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 Test.loadData to populate data in your test methods.

B.

Create a static resource containing test data.

C.

Use the @isTest (isParallel=true) annotation in the test class.

D.

Use the @isTest (seeAllData=true) annotation in the test class.

Question 46

Which three data types can a SOQL query return?

Choose 3 answers

Options:

A.

sObject

B.

Double

C.

Long

D.

List

E.

Integer

Question 47

A developer is creating an app that contains multiple Lightning web components.

One of the child components is used for navigation purposes. When a user clicks a button called Next in the child component, the parent component must be alerted so it can navigate to the next page.

How should this be accomplished?

Options:

A.

Update a property on the parent.

B.

Fire a notification.

C.

Create a custom event,

D.

Call a method in the Apex controller.

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.

Quick action

B.

Apex trigger

C.

Roll-up summary field

D.

Formula field

Question 49

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 PoataliCodeToTimezcone o custom object.

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

Choose 2 answers

Options:

A.

Quick actions

B.

Account trigger

C.

Approval process

D.

Fast Field Updates record-triggered flow

Question 50

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 51

What are two use cases for executing Anonymous Apex code?

Choose 2 answers

Options:

A.

To run a batch Apex class to update all Contacts

B.

To delete 15,000 inactive Accounts in a single transaction after a deployment

C.

To add unit test code coverage to an org

D.

To schedule an Apex class to run periodically

Question 52

What are two considerations for running a flow in debug mode? Choose 2 answers

Options:

A.

Clicking Pause or executing a Pause element closes the flow and ends debugging.

B.

Input variables of type record cannot be passed into the flow.

C.

DML operations will be rolled back when the debugging ends.

D.

Callouts to external systems are not executed when debugging a flow.

Page: 1 / 17
Total 174 questions