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

PDI Exam Dumps - Platform Developer I (SU24)

Question # 4

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

Choose 3 answers

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

Full Access
Question # 5

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?

A.

Quick Actions

B.

Validation rules

C.

Record triggered flows

D.

Apex triggers

Full Access
Question # 6

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?

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

Full Access
Question # 7

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?

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.

Full Access
Question # 8

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?

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.

Full Access
Question # 9

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?

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.

Full Access
Question # 10

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?

A.

Apex trigger

B.

Roll-up summary field

C.

Formula field

D.

Record-triggered flow

Full Access
Question # 11

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?

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.

Full Access
Question # 12

Which Lightning Web Component custom event property settings enable the event to bubble up the containment hierarchy and cross the Shadow DOM boundary?

A.

bubbles: true, composed: true

B.

bubbles: true, composed: false

C.

bubbles: false, composed: false

D.

bubbles: false, composed: true

Full Access
Question # 13

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

Which method allows access to the price book?

A.

Use @IaTest (SeeAllData=true) and delete the existing standard price book,

B.

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

C.

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

D.

Use Teat.getStandardPricebookId() to get the standard price book 1D.

Full Access
Question # 14

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

A.

insert records

B.

Database.insert (records, false)

C.

Insert (records, false)

D.

Database.insert(records, true)

Full Access
Question # 15

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?

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.

Full Access
Question # 16

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

A.

VSCode

B.

Developer Console

C.

Change Sets

D.

SFOX CLI

Full Access
Question # 17

A developer must implement a checkpaymentpbrocaessox class that provides check processing payment capabilities that adhere to what is defined for payments in the paymentProcsssor Interface.

Which implementation is correct to use the paymenterocesscr interface class?

A)

B)

C)

A.

Option A

B.

Option B

C.

Option C

Full Access
Question # 18

How can a developer check the test coverage of autolaunched Flows before deploying them in a change set?

A.

Use SOQL and the Tooling APL.

B.

Use the Flow Properties page.

C.

Use the Code Coverage Setup page.

D.

Use the ApextestResult class.

Full Access
Question # 19

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

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.

Full Access
Question # 20

What are three characteristics of change set deployments?

Choose 3 answers

A.

Change sets can deploy custom settings data.

B.

Change sets can be used to transfer records.

C.

Deployment is done in a one-way, single transaction.

D.

Sending a change set between two orgs requires a deployment connection.

E.

Change sets can only be used between related organization

Full Access
Question # 21

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?

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.

Full Access
Question # 22

A developer creates a Lightning web component that imports a method within an Apex class. When a Validate button is pressed, the method runs to execute complex validations.

In this implementation scenario, which two options are part of the Controller according to the MVC architecture?

Choose 2 answers

A.

HTML file

B.

XML file

C.

Apex class

D.

JavaScript file

Full Access
Question # 23

Universal Containers needs to create a custom user interface component that allows users to enter information about their accounts. The component should be able to validate the user input before saving the information to the database.

What is the best technology to create this component?

A.

Lightning Web Components

B.

Visualforce

C.

Flow

D.

VUE JavaScript framework

Full Access
Question # 24

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

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.

Full Access
Question # 25

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?

A.

Controller extension

B.

Custom controller

C.

Apex trigger

D.

Validation rule

Full Access
Question # 26

What should a developer use to obtain the Id and Name of all the Leads, Accounts, and Contacts that have the company name "Universal Containers"?

A)

B)

C)

D)

A.

Option

B.

Option

C.

Option

D.

Option

Full Access
Question # 27

Which three Salesforce resources can be accessed from a Lightning web component?

Choose 3 answers

A.

All external libraries

B.

SVG resources

C.

Third-party web components

D.

Content asset files

E.

Static resources

Full Access
Question # 28

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?

A.

Embed the Lightning Web Component is a Visualforce Component and add directly to the page layout.

B.

Wrap the Lightning Web Component in an Aura Component and surface the Aura Component as a Visualforce tab.

C.

Use a Visualforce page with a custom controller to invoke the Lightning Web Component using a call to an Apex method.

D.

Use the Lightning Out JavaScript library to embed the Lightning Web Component in a Visualforce page and add to the page layout.

Full Access
Question # 29

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?

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.

Full Access
Question # 30

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?

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.

Full Access
Question # 31

A developer needs to create a baseline set of data (Accounts, Contacts, Products, Assets) for an entire suite of tests allowing them to test independent requirements for various types of Salesforce Cases.

Which approach can efficiently generate the required data for each unit test?

A.

Use @TestSetup with a void method.

B.

Create test data before Test.startTest {} in the unit test,

C.

Add @TsTest (seeAllData=true) at the start of the unit test class.

D.

Create a mock using the Stub API.

Full Access
Question # 32

What are two benefits of using External IDs? Choose 2 answers

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.

Full Access
Question # 33

A custom object Trainer_ < has a lookup field to another custom object cym__ c.

Which SOQL query will get the record for the Viridian City Gym and all it's trainers?

A.

SELECT Id; (SELECT Id FROM Trainers_r) FROM Gym_ _c WHERE Name = 'Viridian City Gym'

B.

SELECT Id, (SELECT Id FROM Trainer_c) FROM Gym__c WHERE Name = 'Viridian City Gym'

C.

SELECT ID FROM Trainer ¢ WHERE Gym__r.Name = 'Viridian City Gym'

D.

SELECT Id, (SELECT Id FROM Trainers_c) FROM Gym_c WHERE Name - 'Viridian City Gym’'

Full Access
Question # 34

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?

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.

Full Access
Question # 35

A developer must perform a complex SOQL query that joins two objects in a Lightning component.

How can the Lightning component execute the query?

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.

Full Access
Question # 36

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?

A.

Developer Console

B.

Visual Studio Code

C.

Salesforce CLI

D.

Force.com Toolkit

Full Access
Question # 37

Universal Containers wants a list button to display a Visualforce page that allows users to edit multiple records.

Which Visualforce feature supports this requirement?

A.

Controller Extension and tag

B.

Standard Controller with Custom List Controller extension

C.

Standard controller and the recordsetzvar page attribute

D.

Custom List Controller with recordSetvar page attribute

Full Access
Question # 38

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

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

Full Access
Question # 39

A developer created a Visualforce page and custom controller to display the account type field as shown below.

Custom controller code:

Visualforce page snippet:

what should the developer do to correct the problem?

A.

Add a getter method for the attribute.

B.

Convert theAccount.Type to a String.

C.

Change theAccount attribute to public.

D.

Add with sharing to the custom controller.

Full Access
Question # 40

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?

A.

Roll-up summary field

B.

Record-triggered flow

C.

Formula field

D.

Apex trigger

Full Access
Question # 41

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

A.

throw new ParityException() ;

B.

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

C.

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

D.

new ParityExcaption () ;

Full Access
Question # 42

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?

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

Full Access
Question # 43

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?

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.

Full Access
Question # 44

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

A.

100

B.

0

C.

500

D.

150

Full Access
Question # 45

A developer considers the following snippet of code:

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

A.

1

B.

3

C.

4

D.

2

Full Access
Question # 46

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

A.

list of newly created sObjects without IDs

B.

Undefined

C.

null

D.

An empty list of sObjects

Full Access
Question # 47

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)

B)

C)

D)

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Full Access
Question # 48

Which code statement includes an Apex method named updateaccounts in the class accountcontreoller for use in a Lightning web component?

A.

import updatelccounts from '@aalesforce/apeax/AccountController':

B.

import updateiccounta from 'AccountConctroller':

C.

import updatelccounta from ‘RAccountContraller,updateiccounta’;

D.

import updase’Accounts from

'@=salesforce/apex/AccountController ., updateaccounts’;

Full Access
Question # 49

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?

A.

Setup Menu

B.

Developer Console

C.

Visual Studio Code IDE

D.

AppExchange

Full Access
Question # 50

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

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.

Full Access
Question # 51

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)

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Full Access
Question # 52

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

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.

Full Access