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

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

Demo: 52 questions
Total 174 questions

Salesforce Certified Platform Developer I (SU24) Questions and Answers

Question 1

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?

Options:

A.

Use a validation rule.

B.

Use a before-save Apex trigger.

C.

Use an automatically launched Approval Process.

D.

Use an auto-response rule.

Question 2

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 3

For which three items can a trace flag be configured? Choose 3 answers

Options:

A.

Visualforce

B.

Apex Trigger

C.

Apex Class

D.

Flow

E.

User

Question 4

What are two considerations for deploying from a sandbox to production? Choose 2 answers

Options:

A.

Should deploy during business hours to ensure feedback can be quickly addressed.

B.

All triggers must have at least one line of test coverage.

C.

least 75% of Apex code must be covered by unit tests.

D.

Unit tests must have calls to the System.assert method.

Question 5

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

A)

B)

C)

D)

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Question 6

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 7

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

The developer creates a test class with a test method that calls Myclass.myStacicMethod 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?

What happens when the developer tries to deploy the trigger and two classes to production, assuming no other code exists?

Options:

A.

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

B.

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

C.

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

D.

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

Question 8

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 Engine=ring Support__c to Opportunity

C.

Master-detail field from Opportunity to Engineering_Supports__c

D.

Lookup field from Engineering Support__c to Opportunity

Question 9

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 10

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 11

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 12

An Opportunity needs to have an amount rolled up from a custom object that is not in a master-detail relationship.

How can this be achieved?

Options:

A.

Use the Streaming API to create real-time roll-up summaries.

B.

Write a trigger on the child object and use an agaregate function to sum the amount for all related child objects under the Opportunity.

C.

Use the Metadata API to create real-time roll-up summaries,

D.

Write a trigger on the Opportunity object and use tree sorting to sum the amount for all related child objects under the Opportunity.

Question 13

What should a developer do to check the code coverage of a class after running all tests?

Options:

A.

View the Class Test Percentage tab on the Apex Class list view in Salesforce Setup.

B.

View the code coverage percentage for the class using the Overall Code Coverage panel in the Developer Console Tests tab,

C.

View the Code Coverage column in the list view on the Apex Classes page.

D.

Select and run the class on the Apex Test Execution page in the Developer Console.

Question 14

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 15

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.

Account,iaDelecable ()

B.

accountRec.a0biectType.iaDeletable()

C.

accountRec.islCelezable()

D.

Schema.sObjectType.Account,isDeletetable() Account,isDelecable ()

Question 16

Universal Containers has a Visualforce page that displays a table of every Container___c being rented by a given Account. Recently this page is failing with a view state limit because some of the customers rent over 10,000 containers.

What should a developer change about the Visualforce page to help with the page load errors?

Options:

A.

Implement pagination with an OffsetController.

B.

Use JavaScript remoting with SOQL Offset.

C.

Implement pagination with a StandardSetController.

D.

Use lazy loading and a transient List variable.

Question 17

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 18

A developer wrote Apex code that calls out to an external system using REST API.

How should a developer write the test to prove the code is working as intended?

Options:

A.

Write a class that implements WebServiceMock.

B.

Write a class that extends HTTPCalloutMock.

C.

Write a class that extends WerServiceMack.

D.

write a class that implements HTTPCalloutMock.

Question 19

Universal Hiring uses Salesforce to capture job applications. A salesforce administrator created two custom objects; Job__c acting as the master object, Job_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.

Roll-up summary field

B.

Record-triggered flow

C.

Formula field

D.

Apex trigger

Question 20

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 21

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 22

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

A)

B)

C)

D)

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Question 23

Considering the following code snippet:

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 Change Data Capture,

B.

Implement a try/catch block for the DML.

C.

Implement the upsert DML statement.

D.

Remove null items from the list of Accounts.

Question 24

A developer created a trigger on the Account object. While testing the trigger, the developer sees the error message 'Maximum trigger depth exceeded’.

What could be the possible causes?

Options:

A.

The developer does not have the correct user permission.

B.

The trigger is too long and should be refactored into a helper class.

C.

The trigger is getting executed multiple times.

D.

The trigger does not have sufficient code coverage.

Question 25

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 26

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

B.

View the Apex Status page

C.

View the Apex Jobs page

D.

Query the AsyncApexJob object

Question 27

A developer must create a DrawList class that provides capabilities defined in the Sortable and Drawable interfaces.

Which is the correct implementation?

A)

B)

Options:

A.

Option A

B.

Option B

Question 28

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 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 Apex controller

B.

An invocable method

C.

An outbound message

D.

An Apex REST class

Question 29

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

Options:

A.

registerEvent

B.

fireEvent ()

C.

emit{)

D.

fire()

Question 30

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 31

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 32

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 33

Which statement describes the execution order when triggers are associated to the same object and event?

Options:

A.

Triggers are executed in the order they are modified.

B.

Triggers are executed alphabetically by trigger name.

C.

Triggers are executed in the order they are created.

D.

Trigger execution order cannot be guaranteed.

Question 34

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

Options:

A.

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

B.

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

C.

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

D.

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

Question 35

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.

Partner Developer Edition

B.

Developer Edition

C.

Developer Sandbox

D.

Full Sandbox

Question 36

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 37

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 38

A developer is tasked with building a custom Lightning web component to collect Contact information.

The form will be shared among many different types of users in the org. There are security requirements that only certain fields should be edited and viewed by certain groups of users.

What should the developer use in their Lightning Web Component to support the security requirements?

Options:

A.

force-input-field

B.

lightning-input-field

C.

ui-input-field

D.

aura-input-field

Question 39

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 40

Which two settings must be defined in order to update a record of a junction object? Choose 2 answers

Options:

A.

Read/Write access on the primary relationship

B.

Read/Write access on the secondary relationship

C.

Read/Write access on the junction object

D.

Read access on the primary relationship

Question 41

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 42

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

Question 43

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 44

Which exception type cannot be caught?

Options:

A.

NoAccessException

B.

LimitException

C.

CalloutException

D.

A custom exception

Question 45

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 46

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 47

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.

Developer Console

C.

Visual Studio Code IDE

D.

AppExchange

Question 48

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.

Developer Console

B.

Visual Studio Code

C.

Salesforce CLI

D.

Force.com Toolkit

Question 49

How does the Lightning Component framework help developers implement solutions faster?

Options:

A.

By providing change history and version control

B.

By providing an Agile process with default steps

C.

By providing device-awareness for mobile and desktops

D.

By providing code review standards and processes

Question 50

A developer is creating a Lightning web component to show a list of sales records.

The Sales Representative user should be able to see the commission field on each record. The Sales Assistant user should be able to see all fields on the record except the commission field.

How should this be enforced so that the component works for both users without showing any errors?

Options:

A.

Use with 8ECTOITYJ2WFORCED in the SOQL that fetches the data for the component.

B.

Use Lightning Locker Service to enforce sharing rules and field-level security.

C.

Use Lightning Data Service to get the collection of sales records.

D.

Use security.stripinaccessible to remove fields inaccessible to the current user.

Question 51

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 52

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.

Demo: 52 questions
Total 174 questions