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

PDI Questions and Answers

Question # 6

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?

A.

Add a new Update Records element.

B.

Add a new Roll Back Records element.

C.

Add a new Create Records element.

D.

Add a new Get Records element.

Full Access
Question # 7

A developer created a child Lightning web component nested inside a parent Lightning web component. The parent component needs to pass a string value to the child component.

In which two ways can this be accomplished?

Choose 2 answers

A.

The parent component can invoke a public method in the child component.

B.

The parent component can use a public property to pass the data to the child component,

C.

The parent can use the Apex controller class to send data to the child component.

D.

The parent component can use a custom event to pass the data to the child component.

Full Access
Question # 8

Universal Containers hires a developer to build a custom search page to help users find the Accounts they want. Users will be able to search on Name, Description, and a custom comments field.

Which consideration should the developer be aware of when deciding between SOQL and SOSL?

Choose 2 answers

A.

SOSL is faster for text searches.

B.

SOQL is able to return more records

C.

SOQL Is faster for text searches.

D.

SOSL is able to return more records.

Full Access
Question # 9

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.

Add lightning_Recordpage to the statuscomponent. js file,

B.

Add lightning RecordPage to the statusComp .js-meta.xml file.

C.

Set is Exposes to true In the statuscomponent.js-meta.xml file.

D.

Add Account to the statusComponent. js-meta.xm1 file.

Full Access
Question # 10

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 PostalCodeToTimezone__c custom object.

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

A.

Quick actions

B.

Approval process

C.

Account trigger

D.

Fast Field Updates record-triggered flow

Full Access
Question # 11

What is a considerations for running a flow in debug mode?

A.

When debugging a schedule-triggered flow, the flow starts only for one record.

B.

Clicking Pause allows an element to be replaced in the flow.

C.

DML operations will be rolled back when the debugging ends.

D.

Callouts to external are not when debugging a flow.

Full Access
Question # 12

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.. of the Controller according to the MVC architecture?

Choose 2 answers

A.

HTML file

B.

Apex class

C.

JavaScript file

D.

XML file

Full Access
Question # 13

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.

OrgLimits

B.

Limits

C.

Messaging

D.

Exception

Full Access
Question # 14

Universal Containers is developing a new Lightning web component for their marketing department. They want to ensure that the component is fine-tuned and provides a seamless user experience.

What are some benefits of using the Lightning Component framework?

A.

Better performance due to client-side rendering

B.

Automatic support for accessibility standards

C.

Compatibility with all web browsers

D.

Easy integration with third-party libraries

Full Access
Question # 15

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?

A.

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

B.

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

C.

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

D.

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

Full Access
Question # 16

For which three items can a trace flag be configured?

Choose 3 answers

A.

Apex Class

B.

Flow

C.

User

D.

Visualforce

E.

Apex Trigger

Full Access
Question # 17

Flow Builder 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 the additional information?

A.

@InvocableMethod(label='Additional Info') public ContactInfo getInfo(Id contactId) { /* implementation */ }

B.

@InvocableMethod(label='Additional Info') public static List getInfo(List contactIds) { /* implementation */ }

C.

@InvocableMethod(label='Additional Info') public static ContactInfo getInfo(Id contactId) { /* implementation */ }

D.

@InvocableMethod(label='Additional Info') public List getInfo(List contactIds) { /* implementation */ }

Full Access
Question # 18

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

Choose 2 answers

A.

Criteria-based sharing calculations

B.

Email messages

C.

Roll-up summary fields

D.

After-save record-triggered flow

Full Access
Question # 19

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

A.

Sharing rules will be enforced by the instantiating class.

B.

Sharing rules will be enforced for the running user.

C.

Sharing rules will not be enforced for the running user.

D.

Sharing rules will be inherited from the calling context.

Full Access
Question # 20

A developer needs to create a baseline set of data (Accounts, Contacts, Products, Assets) for an entire suite of Apex tests allowing

them to test isolated requirements for various types of Salesforce cases.

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

A.

Create a mock using the HttpcalloutMock interface.

B.

Use @TestSetup with a void method.

C.

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

D.

Create test data before Test .startTest() in the unit test.

Full Access
Question # 21

A lead developer creates an Apex interface called Laptop.

Consider the following code snippet:

apex

CopyEdit

public class SilverLaptop {

// code implementation

}

How can a developer use the Laptop interface within the SilverLaptop class?

A.

Extends (class="Laptop") public class SilverLaptop

B.

public class SilverLaptop implements Laptop

C.

public class SilverLaptop extends Laptop

D.

Interface (class="Laptop") public class SilverLaptop

Full Access
Question # 22

A developer needs to allow users to complete a form on an Account record that will create a 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 Dynamic Form.

B.

Create a Custom Permission for the users.

C.

Add a Dynamic Action to the Users’ assigned Page Layouts.

D.

Create a Lightning wed component.

E.

Add a Dynamic Action to the Account Record Page.

Full Access
Question # 23

Which three data types can a SOQL query return?

Choose 3 answers

A.

Double

B.

O Long

C.

sObject

D.

dg Integer

E.

List

Full Access
Question # 24

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?

A.

An Apex trigger on the Opportunity object

B.

An error condition formula on a validation rule on Opportunity

C.

A record trigger flow on the Opportunity object

D.

An approval process on the Opportunity object

Full Access
Question # 25

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?

A.

aura-input-failed

B.

force-input-failed

C.

ui-input-failed

D.

lightning-input-failed

Full Access
Question # 26

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?

A.

Lookup field from Opportunity to Engineering _support__c

B.

Master-detail field from Engineering Support__c to Opportunity

C.

Master-detail field from Opportunity to Engineering Support__c

D.

Lookup field from Engineering Support __c to Opportunity

Full Access
Question # 27

A Salesforce administrator used Flow Builder to create a flow named "accountOnboarding". The flow must be used inside an Aura component.

Which tag should a developer use to display the flow in the component?

A.

lightning: flow

B.

lightning-low

C.

sure-flow

D.

aura: flow

Full Access
Question # 28

Provide question feedback here (optional):

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

A.

4

B.

1

C.

2

D.

3

Full Access
Question # 29

Which action causes a before trigger to fire by default for Accounts?

A.

Renaming or replacing picklists

B.

updating addresses using Mass Address updated tool

C.

Importing data using the Data Loader and the Bulk API

D.

Converting Leads to Contacts

Full Access
Question # 30

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?

A.

throw new ParityException ();

B.

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

C.

new ParityException ();

D.

new ParityException('parity does not match');

Full Access
Question # 31

Given the following Anonymous block:

What should a developer consider for an environment that has over 10,000 Case records?

What should a developer consider for an environment that has over 10,000 Case records?

A.

The transaction will succeed and changes will be committed.

B.

The try-catch block will handle exceptions thrown by governor limits.

C.

The transaction will fail due to exceeding the governor limit.

D.

The try-catch block will handle any DML exceptions thrown,

Full Access
Question # 32

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.

[SELECT Id, (SELECT Id FROM Job_Applications__r) FROM Contact WHERE Accounts.Industry = 'Technology']

B.

[SELECT Id, (SELECT Id FROM Job_Application__c) FROM Contact WHERE Accounts.Industry = 'Technology']

C.

[SELECT Id, (SELECT Id FROM Job_Application__c) FROM Contact WHERE Account.Industry = 'Technology']

D.

[SELECT Id, (SELECT Id FROM Job_Applications__r) FROM Contact WHERE Account.Industry = 'Technology']

Full Access
Question # 33

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

Which three options should be used to build out the database layer for the application?

Choose 3 answers

A.

Custom objects and fields

B.

Triggers

C.

Roll-up summaries

D.

Relationships

E.

Flows

Full Access
Question # 34

A custom object Trainer__c has a lookup field to another custom object Gym__c.

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

A.

SELECT ID FROM Trainer_c WHERE Gym_r.Name = 'Viridian City Gym'

B.

SELECT Id, (SELECT Id FROM Trainer_c FROM Gym_c WHERE Name = ‘Viridian City Gym"

C.

SELECT Id, (SELECT Id FROM Trainers _r) FROM Gym_c WHERE Name = ‘Viridian City Gym'

D.

SELECT Id, (SELECT Id FROM Trainers _c) FROM Gym_c WHERE Name = 'Viridian City Gym'

Full Access
Question # 35

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.

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

C.

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

D.

An External 1D is indexed and can improve the performance of SOOL queries.

Full Access
Question # 36

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?

A.

Indirect Lockup

B.

Direct Lookup

C.

External ID and Unique

D.

Lookup

Full Access
Question # 37

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

A.

Before record-triggered flaw

B.

Apex trigger

C.

After record-triggered flow

D.

Validation rule

Full Access
Question # 38

Refer to the following Apex code:

apex

Copy

Integer x = 0;

do {

x++;

} while (x < 1);

System.debug(x);

What is the value of x when it is written to the debug log?

A.

0

B.

2

C.

1

D.

3

Full Access
Question # 39

A Next Best Action strategy uses an Enhance Element that invokes an Apex method to determine a discount level for a Contact, based on a number of factors.

What is the correct definition of the Apex method?

A.

apex

Copy

@InvocableMethod

global static List> getLevel(List input)

{ /*implementation*/ }

B.

apex

Copy

@InvocableMethod

global Recommendation getLevel(ContactWrapper input)

{ /*implementation*/ }

C.

apex

Copy

@InvocableMethod

global List> getLevel(List input)

{ /*implementation*/ }

D.

apex

Copy

@InvocableMethod

global static List getLevel(List input)

{ /*implementation*/ }

Full Access
Question # 40

A company's engineering department is conducting a month-long test on the scalability of an in-house-developed software that requires a cluster of 100 or more servers. Which of the following models is the best to use?

A.

PaaS

B.

SaaS

C.

BaaS

D.

laaS

Full Access
Question # 41

A developer needs to prevent the creation of Request__c records when certain conditions exist in the system. A RequestLogic class exists that checks the conditions.

What is the correct implementation?

A.

apex

CopyEdit

trigger RequestTrigger on Request__c (before insert) {

RequestLogic.validateRecords(Trigger.new);

}

B.

apex

CopyEdit

trigger RequestTrigger on Request__c (before insert) {

RequestLogic.validateRecords(trigger.new);

}

C.

apex

CopyEdit

trigger RequestTrigger on Request__c (before insert) {

if (RequestLogic.isValid(Request__c)) {

Request.addError('Your request cannot be created at this time.');

}

}

D.

apex

CopyEdit

trigger RequestTrigger on Request__c (after insert) {

if (RequestLogic.isValid(Request__c)) {

Request.addError('Your request cannot be created at this time.');

}

}

Full Access
Question # 42

The value of the account type field is not being displayed correctly on the page. Assuming the custom controller is properly referenced on the Visualforce page, what should the developer do to correct the problem?

A.

Add a getter method for the actType attribute.

B.

Change theAccount attribute to public.

C.

Add with sharing to the custom controller.

D.

Convert theAccount.Type to a String.

Full Access
Question # 43

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.

FIND ‘Universal Conteiners' IN CompenyName Fields RETURNING leadjid, name), sccount(ad, name}, conteact(id, name)

B.

SELECT Lead.id, Lead.Neme, Account,Id, Account.Neme, Contact.id, Contact.Neame FROM Lead, Account, Contact WHERE CompanyName = "Universal Containers*

C.

PIND ‘Universal Centainers’ IN Name Fields RETURNING lead(id, name), saceount(id, mame), contact (id, name)

D.

SELECT lead(id, name), account (id, name}, contact(id, name) FROM Lead, Account, Contact WHERE Name = "Universal Containers’

Full Access
Question # 44

What are two benefits of using declarative customizations over code?

Choose 2 answer

A.

Declarative customizations automatically update with each Salesforce release.

B.

Declarative customizations automatically generate test classes.

C.

Declarative customizations cannot generate run time errors

D.

Declarative customizations generally require less maintenance

Full Access
Question # 45

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?

A.

Schedule a report.

B.

Use the Data Loader command line.

C.

Define a Data Export scheduled job.

D.

Create a Schedulable Apex class.

Full Access
Question # 46

A developer is working on a project to import data from an external system into Salesforce. The data contains sensitive information that should not be visible to all users in Salesforce.

What should the developer do to ensure that the data is secure?

A.

Use a third-party tool to encrypt the sensitive data before importing it into Salesforce.

B.

Use the Apex Data Loader to import the into and write Apex code to handle security and accesscontrol.

C.

Use the Data Import Wizard to import the data arid set up field-level security to restrict access tosensitive fields.

D.

Use the Salesforce CLI to import the data and set up user permissions to restrict access to sensitive data.

Full Access
Question # 47

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?

A.

5

B.

6

C.

10

D.

15

Full Access
Question # 48

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 does not use system. runAs to execute as a specific user.

B.

The test method is calling an @future method.

C.

The test method relies on existing data in the sandbox.

D.

The test method has a syntax error in the code.

Full Access
Question # 49

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

Choose 3 answers

A.

One-time loading for duplicate scripts

B.

Loading scripts in parallel

C.

Loading Files from Documents

D.

Specifying loading order

E.

Loading externally hosted scripts

Full Access
Question # 50

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

Choose 2 answers

A.

Try to use application events as opposed to component events.

B.

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

C.

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

D.

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

Full Access
Question # 51

A developer created a custom order management app that uses an Apex class. The order is represented by an Order object and an

OrderlItem 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 OrderItem records to a new Order record?

A.

Add without sharing to the Apex class declaration.

B.

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

C.

Create a junction object between OrderItem and Order.

D.

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

Full Access
Question # 52

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?

A.

Write a class that implements HTTPcalloutMock.

B.

Write a class that extends webserviceloo.

C.

Write a class that implements webservicemock.

D.

Write a class that extends HTTPcalloutMock.

Full Access
Question # 53

What are two characteristics related to formulas?

Choose 2 answers

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.

Full Access
Question # 54

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

Choose 2 answers

A.

Tooling API

B.

Metadata API

C.

Bulk API

D.

Developer Console

Full Access
Question # 55

A developer must provide custom user interfaces when users edit a Contact in either Salesforce Classic or Lightning Experience.

What should the developer use to override the Contact's Edit button and provide this functionality?

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 page in Lightning Experience

D.

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

Full Access
Question # 56

A developer needs to confirm that a Contact trigger works correctly without changing the organization's data.

What should the developer do to test the Contact trigger?

A.

Use Deploy from the VSCode IDE co deploy an 'insert Contact' Apex class.

B.

Use the New button on the Salesforce Contacts Tab to create a new Contact record.

C.

Use the Test menu on the Developer Console to run oil test classes for the Contact trigger.

D.

Use the Open Execute Anonymous feature on the Developer Console to run an "insert Contact' DML statement.

Full Access
Question # 57

A 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?

A.

Developer sandboxes.

B.

Full Copy sandboxes

C.

Developer orgs

D.

Scratch orgs

Full Access
Question # 58

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?

A.

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

B.

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

C.

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

D.

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

Full Access
Question # 59

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.

Implement pagination with a StandardSetController.

C.

Use JavaScript remoting with SOQL Offset.

D.

Use lazy loading and a transient List variable.

Full Access
Question # 60

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

A.

The Parentid field on the standard Account object

B.

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

C.

The Whatld field on the standard Event object

D.

The LeadId and Contactid fields on the standard Campaign Member object

Full Access
Question # 61

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 another custom object called PostalCodeToTimezone__c.

What is the optimal way to implement this feature?

A.

Build a flow with Flow Builder.

B.

Create an account approval process.

C.

Create a formula field.

D.

Build an account assignment rule.

Full Access