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

PDII Questions and Answers

Question # 6

Refer to the test method below:

The test method calls an @future method that increments the

Number_of_Times_Viewed__c value. The assertion is failing because the

Number of Times Viewed_c equals 0.

What is the optimal way to fix this?

A.

Change the assertion to system.asserciquals (0, acctAfter Number _Cf_Timea_Viewed__c).

B.

Add Test.atartTeat() before and Teat.stopTest() after inser= acct.

C.

Add rest.staztTest() before and Test.stopTess() after AuditUcil.incrementViewed.

D.

Change the initialization to acct. Number_Of_Times_Viewed_c = 1.

Full Access
Question # 7

The Salesforce admin et Cloud Kicks created a custom object called Region_c to store all postal zip codes in the United States and the Cloud Kicks sales region the zip code belongs to.

Cloud Kicks wants a trigger on the Lead to populate the Region based on the Lead's zip code.

Which code segment is the most efficient way to fulfill this request?

A)

B)

C)

D)

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Full Access
Question # 8

A company needs to automatically delete sensitive information after seven years.

This could delete almost a million records every day.

How can this be achieved?

A.

Schedule an 3fuzure process to query records older than seven years, and then recursively invoke itself in 1,000 record batches to delete them,

B.

Use aggregate functions to query for records older than seven years, and then delete the aggrigateResults objects.

{civ [+] Schedule a batch Apex process to run every day that queries and deletes records older than seven years.

C.

Perform a SOSL statement to find records older than 7 years, and then delete the entire result set.

Full Access
Question # 9

A page throws an ‘Attempt to dereference a null object’ error for a Contact.

What change in the controller will fix the error?

A.

Declare a static final Contact at the top of the controller.

B.

(o] Use a condition in the getter to return a new Contact if it is null.

G Change the setter’s signature to return a Contact.

C.

Change the getter's signature to be static Contact.

Full Access
Question # 10

Universal Containers has an Apex trigger on Account that creates an Account Plan record when an Account is marked as a Customer.

Recently a record-triggered flow was added so that whenever an Account is marked as a Customer, a "Customer Since’ date field is updated with today's date. Since the addition of the flow, two Account Plan records are created whenever the Account is marked as a Customer.

What might cause this to happen?

A.

The Apex trigger does not use a static variable to ensure it only fires once.

B.

The flow is configured to use an "Update Records’ element.

C.

The Apex trigger is not bulk safe and calls insert inside of a for loop.

D.

The flow is configured to evaluate when a record is created and every time it is edited.

Full Access
Question # 11

A company wants to run different logic based on an Opportunity's record type.

Which code segment handles this request and follows best practices?

A)

B)

C)

D)

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Full Access
Question # 12

In an organization that has multi-currency enabled, a developer Is tasked with building a Lighting component that displays the top ten Opportunities most recently accessed by the logged in user. The developer must ensure the Amount and LastModifiedDate field values are displayed according to the user's locale.

What is the most effective approach to ensure values displayed respect the user's locale settings?

A.

Use REGEX expressions to format the values retrieved via SOQL.

B.

Use a wrapper class to format the values retrieved via SOQL.

C.

Use the FOR VIEW clause in the SOQL query.

D.

Use the FORMAT () function in the SOQL query.

Full Access
Question # 13

The use of the transient keyword in Visualforce page controllers helps with which common performance issue?

A.

Reduces load times

B.

Improves page transfers

C.

Reduces view state

D.

Improves query performance

Full Access
Question # 14

Universal Containers analyzes a Lightning web component and its Apex controller

class that retrieves a list of contacts associated with an account. The code snippets

are as follows:

Based on the code snippets, what change should be made to display the contacts’ mailing addresses in the Lightning web component?

A.

Add a new method in the Apex controller class to retneve the mailing addresses separately and modify the Lightning web component to invoke this method.

B.

Extend the lightning-datatable component in the Lightning web component to include a column for the MailingAddress field.

C.

Modify the SOQL guery in the getAccountContacts method to include the MailingAddress field.

D.

Modify the SOQL query in the getAccountContacts method to include the MailingAddress field and update the columns attribute in javascript file to add Mailing address fields.

Full Access
Question # 15

Universal Containers (UC) has enabled the translation workbench and has translated picklist values. UC has a custom multi-select picklist field, Product__c, on the Account object that allows sales reps to specify which of UC’s products an Account already has. A developer is tasked with writing an Apex method that retrieves Account records, including the Product_c field.

What should the developer do to ensure the value of Products__c is in the current user's language?

A.

Use tolabel ducts__c) in the fields list of the SOQL query.

B.

Set the locale on each record in the SOQL result list.

C.

Call the translate method on each record in the SOQL result list.

D.

Use the Locale clause in the SOQL query.

Full Access
Question # 16

A company has reference data stored in multiple custom metadata records that represent default information and delete behavior for certain geographic regions.

When a contact is inserted, the default information should be set on the contact from the custom metadata records based on the contact's address information.

Additionally, if a user attempts to delete a contact that belongs to a flagged region, the user must get an error message.

Depending on company personnel resources, what are two ways to automate this?

Choose 2 answers

A.

Remote action

B.

Flow Builder

C.

Apex trigger

D.

Apex invocable method

Full Access
Question # 17

A developer is working on an integration between Salestorce and an external system. The integration requires sending a large amount of data to the external systern, which can cause long response times and timeouts.

To optimize the performance and avoid timeouts, which technique should be used?

A.

Use a chained batch Apex to split the data into smaller batches.

B.

Implement an asynchronous callout using the Continuation class,

C.

Increase the timeout limit in the callout options,

D.

Use the @future annotation to make the callout asynchronous.

Full Access
Question # 18

Universal Containers wants to notify an external system in the event that an unhandled exception occurs when their nightly Apex batch job runs.

What is the appropriate publish/subscribe logic to meet this requirement?

A.

Have the external system subscribe to a custom Platform Event that gets fired with addError{).

B.

Have the external system subscribe to a custom

Platform Event that gets fired with EventBus.publish(1,

C.

Have the external system subscribe to a standard

Platform Event that gets fired with with Eventbus.publish(1.

D.

Have the external system subscribe to a standard Platform Event that gets fired.

Full Access
Question # 19

When developing a Lightning web component, which setting displays lightninglayout-items im one column on small devices, such as mobile phones, and in two

columns on tablet-size and desktop-size screens?

A.

Set size="12" tablet-device-size="6"

B.

Set size="12" medium-device-size="6"

C.

Set size="6" mobile-device-size="12"

D.

Set size="6" small-device-size="12"

Full Access
Question # 20

Business rules require a Contact ta always be created when a new Account is created.

What can be used when developing a custom screen to ensure an Account is not created if the creation of the Contact fails?

A.

Use setSaverpoint (1) and rollback() with a try-catch block.

B.

Use the Database. Insect method with a11orNone SEL LO alee,

C.

Use the Database. Delete method if the Contact insertion fails.

D.

Disable validation rules on Contacts and set default values with a trigger.

Full Access
Question # 21

Universal Containers wants to notify an external system, in the event that an unhandled exception occurs, by publishing a custom event using Apex.

What is the appropriate publish/subscribe logic to meet this requirement?

A.

Publish the error event using the Eventrus.publish() method and have the external system subscribe to the event using CometD.

B.

Publish the error event using the addError () method and write a trigger to subscribe to the event and notify the external system.

C.

Have the external system subscribe to the event channel. No publishing is necessary.

D.

Publish the error event using the addError () method and have the external system subscribe to the event using CometD.

Full Access
Question # 22

A Visualforce page needs to make a callout to get billing information and tax information from two different REST endpoints. The information needs to be

displayed to the user at the same time and the return value of the billing information contains the input for the tax information callout. Each endpoint might take up to two minutes to process.

How should a developer implement the callouts?

A.

An HTTP REST callout for the billing callout and a Continuation for the tax callout

B.

A Continuation for both the billing callout and the tax callout

C.

An HTTP REST callout for both the billing callout and the tax callout

D.

A Continuation for the billing callout and an HTTP REST callout for the tax callout

Full Access
Question # 23

Refer to the Aura component below:

A developer receives complaints that the component loads slowly.

Which change can the developer implement to make the component perform faster?

A.

Change the type of contactInfo to "Map”.

B.

Move the contents of

C.

Add a change event handler for showContactInfo.

D.

Change the default for showContactInfo to “False.

Full Access
Question # 24

Which three approaches should a developer implement to obtain the best performance for data retrieval when building a Lightning web component? Choose 3 answers

A.

Use lazy load for occasionally accessed data.

B.

Use layoutTypes: 9'Full') to display a set of fields.

C.

Use the Lightning Data Service.

D.

Use getRecordUi to obtain metadata.

E.

Use {Cacheable=true} whenever possible

Full Access
Question # 25

Which two queries are selective SOQL queries and can be used for a large data set of 200,000 Account records?

Choose 2 answers

A.

SELECT Id FROM Account WHERE Name LIKE '!-NULL

B.

SELECT Id FRCM Account WHERE Name != ’ ’

C.

SELECT Id FRCM Account WHEP Name IN (List of Names) AND Customer_Number_c= 'ValueA

D.

SELECT Id FROM Account WHERE II IK (List of Account Ida)

Full Access
Question # 26

A developer created a Lightning web component for the Account record page that displays the five most recently contacted Contacts for an Account. The Apex method,

Contacts, returns a list of Contacts and will be wired to a property in the component.

Which two lines must change in the above code to make the Apex method able to be wired?

Choose 2 answers

A.

Add @AuraEnabled {cacheable=trues) to line 08.

B.

Remove private from line 09.

C.

Add public to line 04.

D.

Add @AuraEnabled {cacheable=true) to line 03.

Full Access
Question # 27

A developer is responsible for formulating the deployment process for a Salesforce project. The project follows a source-driven development approach, and the developer wants to ensure efficient deployment and version control of the metadata changes.

Which tool or mechanism should be utilized for managing the source-driven deployment process?

A.

Metadata API

B.

Change Sets

C.

Force.com IDE

D.

Salesforce CLI with Salesforce DX

Full Access
Question # 28

A developer is creating a page in App Builder that will be used in the Salesforce mobile app.

Which two practices should the developer follow to ensure the page operates with optimal performance?

Choose 2 answers

A.

Limit 25 fields on the record detail page.

B.

Limit the number of Tabs and Accordion components.

C.

Analyze the page with Performance Analysis for App Builder.

D.

Limit five visible components on the page.

Full Access
Question # 29

A developer has a requirement to query three fields (Id, Name, Type) from an Account; and first and last names for all Contacts associated with the Account.

Which option is the preferred, optimized method to achieve this for the Account named ‘Ozone Electronics’?

A)

B)

C)

D)

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Full Access
Question # 30

Universal Containers ne=ds to integrate with several external systems. The process Is Initiated when a record Is created in Salesforce, The remote systems do not require Salesforce to wait for a response before continuing.

What is the recommended best solution to accomplish this?

A.

PushTopic event

B.

Qutbound message

C.

Trigger with HTTP callout

D.

Platform event

Full Access
Question # 31

Universal Containers stores user preferences in a hierarchy custom setting,

user Prefs_c, with a checkbox field, show _help co. Company-level defaults are

stored at the organizational level, but may be overridden at the user level. If a user

has not overridden preferences, then the defaults should be used.

How should the show_Help_ c preference be retrieved for the current user?

A.

Boolean show = User_Prefa_ c.getValuea().Show_Help_ co;

B.

Boolean show =

User Prefs c.getValues(UserInfo.getUserid{)).Show_Help c;

C.

Boolean show = User_Prefs_c.getlnstance(].Show Help c;

D.

Boolean show = User Prefs_c.show Melp_c;

Full Access
Question # 32

A software company uses a custom object, Defact__c, to track defects in their

software. Defect__c has organization-wide defaults set to private. Each Defect_ c

has a related list of Reviewer < records, each with a lookup field to User that is

used to indicate that the User will review the defect__c.

What should be used to give the User on the Reviewer_c record read only access

to the Defect__c record on the Reviewer_c record?

A.

Apex managed sharing

B.

Criteria-based sharing

C.

Lightning web component

D.

View All on Defect__c

Full Access
Question # 33

A developer is asked to replace the standard Case creation screen with a custom screen that takes users through a wizard before creating the Case. The org only has users running Lightning Experience.

What should the developer override the Case New Action with to satisfy the requirements?

A.

Lightning Page

B.

Lightning Record Page

C.

Lightning Component

D.

Lightning Flow

Full Access
Question # 34

Universal Containers wants to use a Customer Community with Customer Community Plus licenses to allow their customers access to track how many containers they have rented and when they are due back. Universal Containers uses a Private sharing model for External users, Many of their customers are multi-national corporations with complex Account hierarchies. Each account on the hierarchy represents a department within the same business,

One of the requirements is to allow certain community users within the same

Account hierarchy to see several departments’ containers, based on a custom

junction object that relates the Contact to the various Account records that

represent the departments.

Which solution solves these requirements?

A.

A Visualforce page that uses a custom controller that specifies without sharing [0 expose the records

B.

An Apex trigger that creates Apex managed sharing records based on the junction object's relationships

C.

A Lightning web component on the Community Home Page that uses Lightning Data Services.

D.

A custom list view on the junction object with filters that will show the proper records based on owner

Full Access
Question # 35

A developer is debugging an Apex-based order creation process that has a requirement to have three savepoints, SP1, SP2, and 5P3 {created in order), before the final execution of the process.

During the final execution process, the developer has a routine to roll back to SP1 for a given condition. Once the condition is fixed, the code then calls 2 roll back to SP3 to continue with final execution. However, when the roll back to SP3 is called, a Funtime error occurs.

Why does the developer receive a runtime error?

A.

SP3 became invalid when SP1 was rolled back.

B.

The developer has too many DML statements between the savepoints.

C.

The developer used too many savepoints in one trigger session.

D.

The developer should have called SF2 before calling SP3.

Full Access
Question # 36

Refer to the component code and requirements below:

A)

B)

C)

D)

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Full Access
Question # 37

A developer is developing a reusable Aura component that will reside on an sObject Lightning page with the following HTML snippet:

How can the component"5 controller get the context of the Lightning page that the sObject is on without requiring additional test coverage?

A.

Add force:hasSobjectName to the implements attribute.

B.

Use the gerSubjectType method in an Apex class.

C.

Set the sObject type as a component attribute.

D.

Create a design attribute and configure via App Builder.

Full Access
Question # 38

There are user complaints about slow render times of a custom data table within a Visualforce page that loads thousands of Account records at once.

What can a developer do to help alleviate such issues?

A.

Use JavaScript remoting to query the accounts.

B.

Use the transient keyword in the Apex code when querying the Account records.

C.

Upload a third-party data table library as a static resource.

D.

Use the standard Account List controller and implement pagination.

Full Access
Question # 39

A developer wrote the following method to find all the test accounts in the org:

What should be used to fix this failing test?

A.

Test. fixsdSsarchReaulta [) method to set up expected data

B.

@isTest (SeeAllData=true) to access org data for the test

C.

@testsetup method to set up expected data

D.

Teat.loadData to set up expected data

Full Access
Question # 40

Consider the above trigger intended to assign the Account to the manager of the Account's region,

Which two changes should a developer make in this trigger to adhere to best practices?

A.

Use a Map to cache the results of the Region._c query by Id.

B.

Move the Region__c query to outside the loop.

C.

Use a Map accountMap instead of List accountList.

D.

Remove the last line updating accountList as It Is not needed.

Full Access
Question # 41

A corporation has many different Salesforce orgs, with some different objects and some common objects, and wants to build a single Java application that can create, retrieve, and update common object records in all of the different orgs.

Which method of integration should the application use?

A.

SOAP API with the Partner WSDL

B.

Apex REST Web Service

C.

SOAP API with the Enterprise WSDL

D.

Metadata APT

Full Access
Question # 42

Consider the following code snippet:

Choose 2 answers

A.

Store the URL of the endpoint in a custom Label named endpointURL.

B.

Create a Named Credential, endpoint_NC, to store the endpoint and credentials.

C.

Use reg.setEndpoint(Label.endPoinrURL);,

D.

Use req.setEndpoint,calloat;eodPolat NC'); within the callout request.

Full Access
Question # 43

As part of their quoting and ordering process, a company needs to send POFs to their document storage system's REST endpoint that supports OAuth 2.0. Each Salesforce user must be individually authenticated with the document storage system to send the PDF.

What is the optimal way for a developer to implement the authentication to the REST endpoint?

A.

Named Credential with an OAuth Authentication Provider

B.

Named Credential with Password Authentication

C.

Hierarchy Custom Setting with an OAuth token custom field

D.

Hierarchy Custom Setting with 2 password custom field

Full Access
Question # 44

A company has a custom object, Order__c, that has a custom picklist field, Status__c, with values of ‘New,' 'In Progress,’ or ‘Fulfilled’ and a lookup field,

Contact__c, to Contact.

Which SOQL query will return a unique list of all the Contact records that have no ‘Fulfilled’ Orders?

A)

B)

C)

D)

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Full Access
Question # 45

A developer wrote a class named asccuntRisteryManager that relies on field history tracking. The class has a static method called getaccountHistory that Lakes in an Account as a parameter and returns a list of associated accountHistory object records.

The following test fails:

What should be done to make this test pass?

A.

Create Accountdistory records manually in the test setup and write a query to get them.

B.

Use @isTest (SeeAllData=true] to see historical data from the org and query for Accountdistory records.

C.

Use Test. isRunningTest (] in getAccountHistory() to conditionally return fake AccountHistory records.

D.

The tact method should he delated since this code cannat be tested

Full Access
Question # 46

Refer to the markup below:

A Lightning web component displays the Account name and two custom fields out of

275 that exist on the abject. The custom fields are correctly declared and

populated. However, the developer receives complaints that the component

performs slowly.

What can the developer do to improve the performance?

A.

Replace Layout-type =''Full1" with Layout-type="Partial”.

B.

Replace layout-type =''1" with fields=(fields}.

C.

Add density="compat" to the component.

D.

Add cache="true" to the component.

Full Access
Question # 47

The Account object has a field, Audit_Code_c, that is used to specify what type of auditing the Account needs and a Lookup to User, zudizar_c, that is the assigned auditor. When an Account is initially created, the user specifies the Audit_Code c. Each User in the org has a unique text field, Audit_Code _e, that is used to automatically assign the correct user to the Account’s Auditor_c field.

What should be changed to most optimize the code’s efficiency?

Choose 2 answers

A.

Add an initial SOQL query to get all distinct audit codes.

B.

Build a Map> of audit code to accounts.

C.

Build a Map>of Account Id to audit codes.

D.

Add a WHERE clause to the SOQL query to filter on audit codes.

Full Access
Question # 48

A developer is creating a Lightning web component to display a calendar. The component will be used in multiple countries. In some locales, the first day of the week is a Monday, or a Saturday, or a Sunday. ‘What should the developer do to ensure the calendar displays accurately for users in every locale?

A.

Query the FirstDayofweek field from the Locale for the current user.

B.

Import the @salesforce/i18n module and use

the firstdayofweek internationalization property.

C.

Use a custom metadata type to store key/value pairs.

D.

Use UserInfo.getLocale() in the component.

Full Access
Question # 49

A developer is asked to develop a new AppFxchange application. A feature of the program creates Survey records when a Case reaches a certain stage and is of a certain Record Type. This feature needs to be configurable, as different Salesforce instances require Surveys at different times. Additionally, the out-of-the-box AppExchange app needs to come with a set of best practice settings that apply to

most customers.

What should the developer use to store and package the custom configuration settings for the app?

A.

Custom objects

B.

Custom settings

C.

Custom metadata

D.

Custom labels

Full Access
Question # 50

An Apex trigger and Apex class increment a counter, Edit __C, any time the Case is changed.

A)

B)

C)

D)

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Full Access