Happy Halloween Limited Time 50% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: 5550b640

PDI Exam Dumps - Platform Developer I (SU21)

Question # 4

What will be the output in the debug log in the event of a QueryExeption during a call to the @query method in the following Example?

A.

Querying Accounts. Query Exception.

B.

Querying Accounts. Custom Exception.

C.

Querying Accounts. Query Exception. Done

D.

Querying Accounts. Custom Exception Done.

Full Access
Question # 5

A Visual Flow uses an apex Action to provide additional information about multiple Contacts, stored in a custom class, contactInfo. Which is the correct definition of the Apex method that gets additional information?

A.

@InvocableMethod(label='Additional Info')

public List getInfo(List contactIds)

{ /*implementation*/ }

B.

@InvocableMethod(label='additional Info')

public static ContactInfo getInfo(Id contactId)

{ /*implementation*/ }

C.

@invocableMethod(label)='Additional Info')

public static List getInfo(List contactIds)

{ /*Implementation*/ }

D.

@InvocableMethod(Label='additional Info')

public ContactInfo(Id contactId)

{ /*implementation*/ }

Full Access
Question # 6

What are two ways that a controller and extension can be specified on a Visualforce page?

Choose 2 answers

A.

a@pex:page=Account extends="myControllerExtension"

B.

Qo apex:page standardController="Account" extensions="myControllerExtension”

C.

apex:page controllers="Account, myControllerExtension”

D.

apex:page controller="Account” extensions="myControllerExtension"”

Full Access
Question # 7

An org has an existing Visual Flow that creates an Opportunity with an Update records element. A developer must update the Visual Flow also created a Contact and store the created Contact's ID on the Opportunity.

A.

Add a new Get Records element.

B.

Add a new Create records element.

C.

Add a new Quick Action (of type create) element.

D.

Add a new Update records element

Full Access
Question # 8

A developer needs to implement the functionality for a service agent to gather multiple

pieces of information from a customer in order to send a replacement credit card.

Which automation tool meets these requirements?

A.

Flow Builder

Full Access
Question # 9

A custom picklist field, Food_Preference__c, exist 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 most efficient way to ensure a value is selected every time a record is saved?

A.

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

B.

Set a validation rule to enforce a value is selected.

C.

Mark the field as Required on the field definition.

D.

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

Full Access
Question # 10

A developer wants to retrieve the Contacts and Users with the email address 'dev@uc.com'.

Which SOSL statement should the developer use?

A.

FIND {dev@uc.com} IN Email Fields RETURNING Contact (Email), User (Email)

B.

FIND {Email = 'dev@uc.com'} IN Contact, User

C.

FIND {Email = 'dev@uc.com'} RETURNING Contact (Email), User (Email)

D.

FIND Email IN Contact, User FOR {dev2uc.com}

Full Access
Question # 11

Which two events need to happen when deploying to a production org? Choose 2 answers

A.

All triggers must have at least 1% test coverage.

B.

All Apex code must have at least 75% test coverage.

C.

All triggers must have at least 75% test coverage.

D.

All test and triggers must have at least 75% test coverage combined

Full Access
Question # 12

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

Choose 3 answers

A.

Process Flows

B.

Workflow Rules

C.

Criteria-based Sharing calculations

D.

Email messages

E.

Roll-Up Summary fields

Full Access
Question # 13

A recursive transaction is limited by a DML statement creating records for these two objects:

1. Accounts

2. Contacts

The Account trigger hits a stack depth of 16.

Which statement is true regarding the outcome of the transaction?

A.

The transaction fails only if the Contact trigger stack depth is greater or equal to 16.

B.

The transaction succeeds as long as the Contact trigger stack depth is less than 16.

C.

The transaction fails and all the changes are rolled back.

D.

The transaction succeeds and all the changes are committed to the database.

Full Access
Question # 14

A developer considers the following snippet of code:

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

A.

2

B.

1

C.

3

D.

4

Full Access
Question # 15

How should a custom user interface be provided when a user edits an Account in Lightning Experience?

A.

Override the Account's Edit button with Lightning Flow

B.

Override the Account's Edit button with Lightning Action

C.

Override the Account's Edit button with Lightning page.

D.

Override the Account's Edit button with Lightning component.

Full Access
Question # 16

Assuming that ‘name; is a String obtained by an tag on a Visualforce page.

Which two SOQL queries performed are safe from SOQL injections? Choose 2 answers

A.

String query = 'SELECT Id FROM Account WHERE Name LIKE \''%' + name.noQuotes() + '%\'';

List results = Database.query(query);

B.

String query = 'SELECT Id FROM Account WHERE Name LIKE \''%' + String.escapeSingleQuotes(name) + '%\'';

List results = Database.query(query);

C.

String query = 'SELECT Id FROM Account WHERE Name LIKE \''%' + name + '%\'';

List results = Database.query(query);

D.

String query = '%' + name + '%';

List results = [SELECT Id FROM Account WHERE Name LIKE :query];

Full Access
Question # 17

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. i, J

Calculator

How can the developer find the current user's default record type? ns

A.

Query the Profile where the ID equals userInfo.getProfileID() and then use the profile.Opportunity.getDefaultRecordType() | |

method. ] |

B.

o Use Opportunity. SObjectType.getDescribe().getRecordTypelnfos() to get a list of record types, and iterate through them until [ J

isDefaultRecordTypeMapping() is true. Pencil & Paper |

C.

Use the Schema.userlnfo.Opportunity.getDefaultRecordType() method. <

Create the opportunity and check the opportunity.recordType before inserting, which will have the record ID of the current Dal

user's default record type.

Full Access
Question # 18

Universal Containers wants to back up all of the data and attachments in its Salesforce org once month. Which approach should a developer use to meet this requirement?

A.

Use the Data Loader command line.

B.

Create a Schedulable Apex class.

C.

Schedule a report.

D.

Define a Data Export scheduled job.

Full Access
Question # 19

Universal Containers decides to use purely declarative development to build out a new Salesforce application.

Which three options can be used to build out the business logic layer for this application?

Choose 3 answers

A.

Flow Builder

B.

Validation Rules

C.

Process builder

Full Access
Question # 20

While writing an Apex class that creates Accounts, a developer wants to make sure that all required fields are handled properly.

Which approach should the developer use to be sure that the Apex class works correctly?

A.

Include a try/catch block to the Apex class.

Full Access
Question # 21

A developer must create a DrawList class that provides capabilities defined in the Sortable and Drawable interfaces. public interface Sortable { void sort(); } public interface Drawable { void draw(); } Which is the correct implementation?

A.

Public class DrawList implements Sortable, Implements Drawable {

public void sort() { /*implementation*/}

public void draw() { /*implementation*/}

]

B.

Public class DrawList extends Sortable, Drawable {

public void sort() { /*implementation*/}

public void draw() { /*implementation*/}

}

C.

Public class DrawList implements Sortable, Drawable {

public void sort() { /*implementation*/}

public void draw() { /*implementation*/}

}

D.

Public class DrawList extends Sortable, extends Sortable, extends Drawable {

public void sort() { /*implementation*/ }

public void draw() { /* implementation */}

Full Access
Question # 22

Universal Containers (UC) uses a custom object called Vendor. The Vendor custom object has a Master-Detail relationship with the standard Account object. Based on some internal discussion, the UC administrator tried to change the Master-Detail relationship to a Lookup relationship but was not able to do so. What is a possible reason that this change was not permitted?

A.

The Account records contain Vendor roll-up summary fields.

B.

The Vendor object must use a Master-Detail field for reporting.

C.

The Vendor records have existing values in the Account object.

D.

The Account object is included on a workflow on the Vendor object.

Full Access
Question # 23

A developer must create a ShippingCalculator class that cannot be instantiated and must include a working default implementation of a calculate method, that sub-classes can override.

What is the correct implementation of the ShippingCalculator class?

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Full Access
Question # 24

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 Anonymous Apex to create the required data.

B.

Use SOQL to query the org for the required data.

C.

Use Test.Loaddata () and reference a static resource.

D.

Use Test.Loaddata () and reference a CSV file

Full Access
Question # 25

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 Loader runs from the developer's browser.

B.

Data Import Wizard does not support Opportunities.

C.

Data Loader automatically relates Opportunities to Accounts.

D.

Data Import Wizard can not import all 500 records.

Full Access
Question # 26

Which two are best practices when it comes to component and application event handling? (Choose two.)

A.

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

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.

Try to use application events as opposed to component events.

Full Access
Question # 27

What is the order of operations when a record is saved in Salesforce?

A.

Process flows, triggers, workflow, commit

B.

Workflow, process flows, triggers, commit

C.

Workflow, triggers, process flows, commit

D.

Triggers, workflow, process flows, commit

Full Access
Question # 28

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

Choose 3 answers

A.

SVG resources

B.

Third-party web components

C.

Content asset files

D.

Static resources

E.

All external libraries

Full Access
Question # 29

Which Apex class contains methods to return the amount of resources that have been used for a particular governor, such as the number of DML statements?

A.

Exception

B.

Messaging

C.

OrgLimits

D.

Limits

Full Access
Question # 30

Universal Containers wants Opportunities to be locked from editing when reaching the Closed/Won stage.

Which two strategies should a developer use to accomplish this? Choose 2 answers

A.

Use a validation rule.

B.

Use a trigger.

Full Access
Question # 31

Which two are phases in the Salesforce Application Event propagation framework? Choose

2 answers

A.

Bubble

B.

Default

C.

Capture

Full Access