Black Friday Sale - Special 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: 70dumps

PDI Questions and Answers

Question # 6

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 # 7

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?

A.

Quick action

B.

Apex trigger

C.

Roll-up summary field

D.

Formula field

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 lead developer creates an Apex interface called Laptop.

Consider the following code snippet:

How can a developer use the Laptop Interface within the silverzaptop class?

A.

public class Silverlaptop extends Lapctop

B.

public class Silverlaprop implementa Laptop

C.

Extends (class="Laptop”) publiic claas Silverlaptcp

D.

Interface (class="Laptop") public class Silverlaptop

Full Access
Question # 10

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

A.

Sharing rules will be inherited from the calling context.

B.

Sharing rules will not be enforced for the running user.

C.

Sharing rules will be enforced by the instantiating class.

D.

Sharing rules will be enforced for the running user.

Full Access
Question # 11

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 # 12

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 # 13

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 # 14

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 # 15

Universal Containers wants to automatically assign new cases to the appropriate support representative based on the case origin. They have created a custom field on the Case object to store the support

representative name.

What is the best solution to assign the case to the appropriate support representative?

A.

Use a validation rule on the Case object.

B.

Use an Assignment Flow element.

C.

Use a trigger on the Case object.

D.

Use a formula field on the Case object.

Full Access
Question # 16

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 # 17

A developer is tasked to perform a security review of the ContactSearch Apex class that exists in the system. Within the class, the developer identifies the following method as a security threat:

What are two ways the developer can update the method to prevent a SOQL injection attack?

Choose 2 answers

A.

Use a regular expression expression on the parameter to remove special characters,

B.

Use the escapeSingleQuotes method to sanitize the parameter before its use.

C.

Use variable binding and replace the dynamic query with a static SOQL.

D.

Use the @Readonly annotation and the with sharing keyword on the class

Full Access
Question # 18

Which three data types can a SOQL query return?

Choose 3 answers

A.

sObject

B.

Double

C.

Long

D.

List

E.

Integer

Full Access
Question # 19

Which exception type cannot be caught?

A.

NoAccessException

B.

LimitException

C.

CalloutException

D.

A custom exception

Full Access
Question # 20

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 # 21

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?

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

Full Access
Question # 22

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?

A.

An Apex controller

B.

An invocable method

C.

An outbound message

D.

An Apex REST class

Full Access
Question # 23

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.

Full Copy sandboxes

B.

Developer orgs

C.

Developer sandboxes

D.

Scratch orgs

Full Access
Question # 24

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

A.

Visualforce

B.

Apex Trigger

C.

Apex Class

D.

Flow

E.

User

Full Access
Question # 25

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.

Define a Data Export scheduled

C.

Use the Data Loader command line.

D.

Create a Schedulable Apex class.

Full Access
Question # 26

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?

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.

Full Access
Question # 27

A software company is using Salesforce to track the companies they sell their software to in the Account object. They also use Salesforce to track bugs in their software with a custom object, Bug__c.

As part of a process improvement initiative, they want to be able to report on which companies have reported which bugs. Each company should be able to report multiple bugs and bugs can also be reported by multiple companies.

What is needed to allow this reporting?

A.

Junction object between Bug_c and Account

B.

Master-detail field on Bug__c to Account

C.

Lookup field on sug_c to Account

D.

Roll-up summary field of Bug__c on Account

Full Access
Question # 28

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 # 29

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

A.

Quick actions

B.

Account trigger

C.

Approval process

D.

Fast Field Updates record-triggered flow

Full Access
Question # 30

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

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.

Full Access
Question # 31

What Is the result of the following code snippet?

A.

Accounts are inserted.

B.

Account is inserted.

C.

200 Accounts are inserted,

D.

201 Accounts are inserted.

Full Access
Question # 32

When using Salesforce DX, what does a developer need to enable to create and manage scratch orgs?

A.

Dev Hub

B.

Production

C.

Environment Hub

D.

Sandbox

Full Access
Question # 33

Universal Containers implemented a private sharing model for the Account object. A custom Account search tool was developed with Apex to help sales representatives find accounts that match multiple criteria they specify. Since its release, users of the tool report they can see Accounts they do not own.

What should the developer use to enforce sharing permissions for the currently logged in user while using the custom search tool?

A.

Use the schema describe calls to determine if the logged-in user has access to the Account object,

B.

Use the with sharing keyword on the class declaration.

C.

Use the without sharing keyword on the class declaration.

D.

Use the UserInfo Apex class to filter all SOQL queries to returned records owned by the logged-in user.

Full Access
Question # 34

Assuming that name is a String obtained by an tag on a Visualforce page, which two SOQL queries performed are safe from SOQL injection? Choose 2 answers

A)

B)

C)

D)

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Full Access
Question # 35

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 # 36

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

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.

Full Access
Question # 37

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 # 38

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)

B)

C)

D)

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Full Access
Question # 39

A Primaryid__c custom field exists on the candidate_ c custom object. The field is used to store each candidate's id number and is marked as Unique in the schema definition.

As part of a data enrichment process, Universal Containers has a CSV file that contains updated data for all candidates in the system. The file contains each Candidate's primary id as a data point. Universal Containers wants to upload this information into Salesforce, while ensuring all data rows are correctly mapped to a candidate in the system.

Which technique should the developer implement to streamline the data upload?

A.

Create a before Insert trigger to correctly map the records.

B.

Create a before save flow to correctly map the records.

C.

Update the PrimaryId__ c field definition to mark it as an External Id.

D.

Upload the CSV into a custom object related to Candidate__ c.

Full Access
Question # 40

Which three resources in an Aura component can contain JavaScript functions? Choose 3 answers

A.

Renderer

B.

Controller

C.

style

D.

Helper

E.

Design

Full Access
Question # 41

What should a developer use to script the deployment and unit test execution as part of continuous integration?

A.

VS Code

B.

Developer Console

C.

Execute Anonymous

D.

Salesforce CLI

Full Access
Question # 42

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 # 43

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.

aura-flow

C.

aura:flow

D.

lightning-flow

Full Access
Question # 44

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

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.

Full Access
Question # 45

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

A)

B)

C)

D)

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Full Access
Question # 46

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?

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.

Full Access
Question # 47

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?

A.

Screen-based flow

B.

Lightning Component

C.

Approval process

D.

Apex trigger

Full Access
Question # 48

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?

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.

Full Access
Question # 49

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?

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

Full Access
Question # 50

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 # 51

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 # 52

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.

Apex trigger

B.

validation rule

C.

After record-triggered flow

D.

Before record-triggered flow

Full Access