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

PDI Questions and Answers

Question # 6

Which three data types can a SOQL query return?

Choose 3 answers

A.

List

B.

Long

C.

Integer

D.

sObJect

E.

Double

Full Access
Question # 7

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

Universal Containers hires a developer to build a custom search page to help user- 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 able to return more records.

B.

SOQL is faster for text searches.

C.

SOSL is faster for tent searches.

D.

SOQL is able to return more records.

Full Access
Question # 9

As part of new feature development, a developer is asked to build a responsive application capable of responding to touch events, that will be executed on stateful clients.

Which two technologies are built on a framework that fully supports the business requirement? Choose 2 answers

A.

Aura Components

B.

Vlsualforce Components

C.

Lightning Web Components

D.

Visualforce Pages

Full Access
Question # 10

A developer has a single custom controller class that works with a Visualforce Wizard to support creating and editing multiple subjects. The wizard accepts data from user inputs across multiple Visualforce pages and from a parameter on the initial URL.

Which three statements are useful inside the unit test to effectively test the custom controller?

Choose 3 answers

A.

insert pageRef.

B.

Test.setCurrentPage(pageRef);

C.

public ExtendedController(ApexPages StandardController cntrl) { }

D.

ApexPages.CurrentPage().getParameters().put('input\’, 'TestValue');

E.

String nextPage - controller.save().getUrl();

Full Access
Question # 11

A developer created a new trigger that inserts a Task when a new Lead is created. After deploying to production, an outside integration chat reads task records is periodically reporting errors.

Which change should the developer make to ensure the integration is not affected with minimal impact to business logic?

A.

Deactivate the trigger before the integration runs.

B.

Use a try-catch block after the insert statement.

C.

Remove the Apex class from the integration user's profile.

D.

Use the Database method with all or None set to false

Full Access
Question # 12

Which Lightning code segment should be written to declare dependencies on a Lightning component, c:accountList, that is used in a Visualforce page?

A)

B)

C)

D)

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Full Access
Question # 13

A developer wants to invoke on outbound message when a record meets a specific criteria.

Which three features satisfy this use case?

Choose 3 answer

A.

Approval Process has the capacity to check the record criteria and send an outbound message without Apex Code

B.

Process builder can be used to check the record criteria and send an outbound message with Apex Code.

C.

workflows can be used to check the record criteria and send an outbound message.

D.

Process builder can be used to check the record criteria and send an outbound messagewithout Apex Code.

E.

Visual Workflow can be used to check the record criteria and send an outbound message without Apex Code.

Full Access
Question # 14

A developer considers the following snippet of code:

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

A.

3

B.

1

C.

4

D.

2

Full Access
Question # 15

A company has been adding data to Salesforce and has not done a good Job of limiting the creation of duplicate Lead records. The developer is considering writing an Apex process to identify duplicates and merge the records together.

Which two statements are valid considerations when using merged?

Choose 2 answers

A.

The field values on the master record are overwritten by the records being merged.

B.

Merge is supported with accounts, contacts, cases, and leads.

C.

External ID fields can be used with the merge method.

D.

The merge method allows up to three records, including the master and two additional records with the same sObject type, to be merged into the master record.

Full Access
Question # 16

What does the Lightning Component framework provide to developers?

A.

Extended governor limits for applications

B.

Prebuilt component that can be reused.

C.

Templates to create custom components.

D.

Support for Classic and Lightning UIS.

Full Access
Question # 17

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 execjte the query and invoke from the Lightning component

B.

Write the query in a custom Lightning web component wrapper ana 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 # 18

Which aspect of Apex programming is limited due to multitenancy?

A.

The number of active Apex classes

B.

The number of methods in an Apex Class

C.

The number of records processed in a loop

D.

The number of records returned from database queries

Full Access
Question # 19

A developer has a Visualforce page and custom controller to save Account records. The developer wants to display any validation rule violation to the user. How can the developer make sure that validation rule violations are displayed?

A.

Add cuatom controller attributes to display the message.

B.

Include on the Visualforce page.

C.

Use a try/catch with a custom exception class.

D.

Perform the DML using the Database.upsert() method.

Full Access
Question # 20

The following automations already exist on the Account object;

• A workflow rule that updates a field when a certain criteria is met

• A custom validation on a field

• A How that updates related contact records

A developer created a trigger on the Account object.

What should the developer consider while testing the trigger code?

A.

The flow may be launched multiple times.

B.

Workflow rules will fire only after the trigger has committed all DML operations to the database.

C.

A workflow rule field update will cause the custom validation to run again.

D.

The trigger may fire multiple times during a transaction.

Full Access
Question # 21

What is the result of the following code?

A.

The record will not be created and a exception will be thrown.

B.

The record will be created and a message will be in the debug log.

C.

The record will not be created and no error will be reported.

D.

The record will be created and no error will be reported.

Full Access
Question # 22

A company has a custom object, Order__c, that has a required, unique external ID field called OrderNumber__c.

Which statement should be used to perform the DML necessary to insert new records and update existing records in a list of order__c records

using the external ID field?

A.

B.

C.

D.

Full Access
Question # 23

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.

What should be built to implement this feature?

A.

Account custom trigger

B.

Account approval process

C.

Account assignment rule

D.

Account workflow rule

Full Access
Question # 24

A developer is creating an app that contains multiple Lightning web components.

One of the child components is used for navigation purposes. When a user click a button called.. component, the parent component must be alerted so it can navigate to the next page.

How should this be accomplished?

A.

Fire a notification.

B.

Update a property on the parent.

C.

Call a method in the Apex controller.

D.

Create a custom event.

Full Access
Question # 25

A developer wants to get access to the standard price book in the org while writing a test class that covers an OpportunityLineItem trigger. Which method allows access to the price book?

A.

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

B.

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

C.

Use Test,getStandardPricebookid ( ) to get the standard price book ID.

D.

Use @IsTest (SeeAllData=True) and delete the existing standard price book

Full Access
Question # 26

A developer at AW Computing is tasked to create the supporting test class for a 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.

hich two approaches can the developer use to ensure Pricing _Structure__c records are available when the test class is executed?

Choose 2 answers

A.

Use a Test Date Factory class.

B.

Use the @raTeat (seeAllData=true) annotation.

C.

Use the Test. leadtear{} method,

D.

Use without shering on the class declaration.

Full Access
Question # 27

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 Visualforce page in Salesforce Classic and a Lightning component in Lightning Experience

B.

A Lightning component in 5alesforce Classic and a Lightning component in lightning Experience

C.

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

D.

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

Full Access
Question # 28

Which three statements are true regarding custom exceptions in Apex? (Choose three.)

A.

A custom exception class must extend the system Exception class.

B.

A custom exception class can implement one or many interfaces.

C.

A custom exception class cannot contain member variables or methods.

D.

A custom exception class name must end with “Exception”.

E.

A custom exception class can extend other classes besides the Exception class.

Full Access
Question # 29

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

An Apex method, getAccounts, that returns a list of Accounts given a searchTern, is available for Lightning Web

Components to use.

What is the correct definition of a Lightning Web Component property that uses the getAccounts method?

A)

B)

C)

D)

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Full Access
Question # 31

A developer is creating a test coverage for a class and needs to insert records to validate functionality. Which method annotation should be used to create records for every method in the test class?

A.

@BeforeTest

B.

@isTest(SeeAllData=True)

C.

@TestSetup

D.

@PreTest

Full Access
Question # 32

A custom Visualforce controller calls the ApexPages,addMessage () method, but no messages are rendering on the page.

Which component should be added to the Visualforce page to display the message?

A.

B.

C.

D.

Full Access
Question # 33

Which two sfdx commands can be used to add testing data to a Developer sandbox?

A.

Forced: data:bulk:upsert

B.

Forced: data: object :upsert

C.

Forced: data: tree: upsert

D.

Forced: data:async:upsert

Full Access
Question # 34

A primaryid_c custom field exists on the candidate_c custom object. The filed 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 Process Builder on the Candidate_c object to map the records.

B.

Create a before Insert trigger 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 # 35

Which statement generates a list of Leads and Contacts that have a field with the phrase 'ACME'?

A.

List> searchList = [SELECT Name, ID FROM Contact, Lead WHERE Name like "tACME3"];

B.

List> searchList = [FIND '*ACME*" IN ALL FIELDS RETURNING Contact, Lead];

C.

Map searchList = [FIND '*ACME*' IN ALL FIELDS RETURNING Contact, Lead];

D.

List searchList = [FIND '*ACME*' IN ALL FIELDS RETURNING Contact, Lead];

Full Access
Question # 36

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.

Scratch orgs

C.

Full Copy sandboxes

D.

Developer orgs

Full Access
Question # 37

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.

Flow

B.

Lightning Web Components

C.

Visualforce

D.

VUE JavaScript framework

Full Access
Question # 38

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 of 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 Apex REST class

C.

An outbound message

D.

An invocable method

Full Access
Question # 39

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

Apex trigger

C.

Formula field

D.

Record-triggered flow

Full Access
Question # 40

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 child object and use a red-black tree sorting to sum the amount for all related child objects under the Opportunity.

B.

Write a Process Builder that links the custom object to the Opportunity.

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 Streaming API to create real-time roll-up summaries.

Full Access
Question # 41

Refer to the following code snippet for an environment has more than 200 Accounts belonging to the Technology' industry:

When the code execution, which two events occur as a result of the Apex transaction?

When the code executes, which two events occur as a result of the Apex transaction?

Choose 2 answers

A.

If executed in an asynchronous context, the apex transaction is likely to fall by exceeding the DML governor limit

B.

The Apex transaction succeeds regardless of any uncaught exception and all processed accounts are updated.

C.

The Apex transaction fails with the following message. "SObject row was retrieved via SOQL without querying the requested field Account.Is.Tech__c''.

D.

If executed In a synchronous context, the apex transaction is likely to fall by exceeding the DHL governor limit.

Full Access
Question # 42

A developer at Universal Containers is taked with implementing a new Salesforce application that bwill be maintained completely by their company’s Salesforce admiknistrator.

Which two options should be considered for buildig out the business logic layerof the application?

Chosse 2 answer

A.

Validation Rules

B.

Record-Triggered flows

C, Scheduled

C.

Unvocable Moorche2023-06-13T14:55:00.63

Actions

Full Access
Question # 43

A developer migrated functionality from JavaScript Remoting to a Lightning web component and wants to use the existing getOpportunities() method to provide data.

What to do now?

A.

The method must be decorated with (cacheable=true).

B.

The method must be decorated with @AuraEnabled.

C.

The method must return a JSON Object.

D.

The method must return a String of a serialized JSON Array.

Full Access
Question # 44

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

A company decides to implement a new process where every time an Opportunity is created, a follow up Task should be created and assigned to the Opportunity Owner.

What is the most efficient way for a developer to implement this?

A.

Auto-launched flow on Task

B.

Apex trigger on Task

C.

Task actions

D.

Record-trigger flow on Opportunity

Full Access
Question # 46

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 of 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 Apex REST class

C.

An outbound message

D.

An invocable method

Full Access
Question # 47

A developer creates a new Apex trigger with a helper class, and writes a test class that only exercises 95% coverage of new Apex helper class. Change Set deployment to production fails with the test coverage warning: "Test coverage of selected Apex Trigger is 0%, at least 1% test coverage is required" What should the developer do to successfully deploy the new Apex trigger and helper class?

A.

Create a test class and methods to cover the Apex trigger

B.

Run the tests using the 'Run All Tests' method.

C.

Remove the falling test methods from the est class.

D.

Increase the test class coverage on the helper class

Full Access
Question # 48

What are two considerations for running a flow in debug mode?

Choose 2 answers

A.

Callouts to external systems are not executed when debugging a flow.

B.

Clicking Pause or executing a Pause element closes the flow and ends debugging.

C.

Input variables of type record cannot be passed into the flow,

D.

DML operations will be rolled back when the debugging ends.

Full Access
Question # 49

A developer needs to implement a custom SOAP Web Service that is used by an external Web Application. The developer chooses to Include helper methods that are not used by the Web Application In the Implementation of the Web Service Class.

Which code segment shows the correct declaration of the class and methods?

A)

B)

C)

D)

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Full Access
Question # 50

A developer created a child Lightning web component nested inside a parent Lightning web component, 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 use a custom event to pass the data to the child component,

B.

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

C.

The parent component can invoke a method in the child component

D.

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

Full Access
Question # 51

Universal Containers recently transitioned from Classic to Lighting Experience. One of its business processes requires certain value from the opportunity object to be sent via HTTP REST callout to its external order management system based on a user-initiated action on the opportunity page. Example values are as follow

  • Name
  • Amount
  • Account

Which two methods should the developer implement to fulfill the business requirement? (Choose 2 answers)

A.

Create a Lightning component that performs the HTTP REST callout, and use a Lightning Action to expose the component on the Opportunity detail page.

B.

Create a Process Builder on the Opportunity object that executes an Apex immediate action to perform the HTTP REST callout whenever the Opportunity is updated.

C.

Create an after update trigger on the Opportunity object that calls a helper method using @Future(Callout=true) to perform the HTTP REST callout.

D.

Create a Visualforce page that performs the HTTP REST callout, and use a Visualforce quick action to expose the component on the Opportunity detail page.

Full Access
Question # 52

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.

Use JavaScript remotlng with SOQL Offset.

B.

Implement pagination with a StandardSetController.

C.

Implement pagination with an OffaetController.

D.

Use lazy loading and a transient List variable.

Full Access
Question # 53

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.

Apex trigger

B.

Approval process

C.

Screen-based flow

D.

Lightning Component

Full Access
Question # 54

Assuming that naze is 8 String obtained by an tag on 8 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 # 55

What should be used to create scratch orgs?

A.

Developer Console

B.

Salesforce CLI

C.

Workbench

D.

Sandbox refresh

Full Access
Question # 56

Which two scenarios require an Apex method to be called imperatively from a Lightning web component?

Choose 2 answer

A.

Calling a method that makes a web service callout

B.

Calling a method that is not annotated with cacheable-true

C.

Calling a method with the click of a button

D.

Calling a method that is external to the main controller for the Lightning web component

Full Access
Question # 57

What are two ways a developer can get the status of an enquered job for a class that queueable interface? Choose 2 answers

A.

View the apex status Page

B.

View the apex flex Queue

C.

View the apex Jobs page

D.

Query the AsyncApexJobe object

Full Access
Question # 58

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?

A.

Full Sandbox

B.

Developer Edition

C.

Partner Developer Edition

D.

Developer Sandbox

Full Access
Question # 59

Ursa Major Solar has a custom object, serviceJob-o, with an optional Lookup field to Account called partner-service-Provider_c.

The TotalJobs-o field on Account tracks the total number of serviceJob-o records to which a partner service provider Account is related.

What is the most efficient way to ensure that the Total job_o field kept up to data?

A.

Change TotalJob_o to a roll-up summary field.

B.

Create a record-triggered flow on ServiceJob_o.

C.

Create an Apex trigger on ServiceJob_o.

D.

Create a schedule-triggered flow on ServiceJob_o.

Full Access
Question # 60

Given the following Apex statement:

What occurs when more than one Account is returned by the SOQL query?

A.

The query falls and an error Is written to the debug log.

B.

The variable, nvAccount, Is automatically cast to the List data type.

C.

The first Account returned Is assigned to myAccour.t.

D.

An unhandled exception is thrown and the code terminates.

Full Access
Question # 61

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.

A record trigger flow on the Opportunity object

B.

An Apex trigger on the Opportunity object

C.

approval process on the Opportunity object

D.

An error condition formula on a validation rule on Opportunity

Full Access
Question # 62

A developer wrote Apex code that calls out to an external system. How should a developer write the test to provide test coverage?

A.

Write a class that extends HTTPCalloutMock.

B.

Write a class that implements the HTTPCalloutMock interface.

C.

Write a class that implements the WebserviceMock interface.

D.

Write a class that extends WebserviceMock

Full Access
Question # 63

Universal Container wants Opportunities to no longer be editable when itreaches the Closed/Won stage. Which two strategies can a developer use to accomplish this?

Choose2 answer

A.

Use a validation

B.

Use a trigger

C.

Use an after-save flow.

D.

Use the Process Automation settings.

Full Access
Question # 64

Consider the following code snippet:

Given the multi-tenant architecture of the Salesforce platform, what Is a best practice a developer should Implement and ensure successful execution of the method?

A.

Avoid executing queries without a limit clause.

B.

Avoid returning an empty List of records.

C.

Avoid using variables as query filters.

D.

Avoid performing queries inside for loops.

Full Access
Question # 65

Which three resources in an Azure Component can contain JavaScript functions?

A.

Controllers

B.

helper

C.

Design

D.

Style

E.

Renderer

Full Access
Question # 66

A Lightning component has a wired property, searchResults, that stores a list of Opportunities. Which definition of the Apex method, to which the searchResults property is wired, should be used?

A.

@AuraEnabled(cacheable=true)

public static List search(String term) { /* implementation*/ }

B.

@AuraEnabled(cacheable=true) public List search(String term) { /*implementation*/ }

C.

@AuraEnabled(cacheable=false) public static List search(String term) { /*implementation*/ }

D.

@AuraEnabled(cacheable=false) public List search(String term) { /*implementation*/ }

Full Access
Question # 67

A develop completed modification 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?

A.

Apex classes must have at least 75% code coverage org-wide.

B.

At least one line of code must be executed for the Apex trigger.

C.

All methods in the test classes must use @isTest.

D.

Test methods must be declared with the testMethod keyword.

Full Access
Question # 68

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

A.

Tooling API

B.

Developer console

C.

Bulk API

D.

Matadata API

Full Access
Question # 69

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.

Roll-Up Summaries

B.

Triggers

C.

Relationships

D.

Flow

E.

Custom Objects and Fields

Full Access
Question # 70

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

A.

The Parentid field on the standard Account object

B.

The LeadId and ContactId fields on the standard Campaign Member object

C.

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

D.

The Whatld field on the standard Event object

Full Access