Pre-Summer Special Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: validbest

Pass the Salesforce Developers PDII Questions and answers with ValidTests

Exam PDII All Questions
Exam PDII Premium Access

View all detail and faqs for the PDII exam

Viewing page 3 out of 5 pages
Viewing questions 21-30 out of questions
Questions # 21:

A Salesforce developer is hired by a multi-national company to build a custom

Lightning application that shows employees their employment benefits and earned

commissions over time. The application must acknowledge and respect the user's

locale context for dates, times, numbers, currency, and currency symbols.

When using Aura components, which approach should the developer implement to

ensure the Lightning application complies with the user's locale?

Options:

A.

Use the $User global variable to retrieve the user preferences.

B.

Use the $Label global value provider.

C.

Use the $Lacale value provider to retrieve the user preferences.

D.

Create a Hierarchical custom setting to store user preferences.

Expert Solution
Questions # 22:

A company has code to update a Request and Request Lines and make a callout to

their external ERP system's REST endpoint with the updated records.

Question # 22

The callousUtil.makeRestCallout fails with a "You have uncommitted work pending. Please commit or rollback before calling cut’ error.

What should be done to address the problem?

Options:

A.

Change the callousUtil makeRestCallout to an @InvocsblsMethod method.

B.

Remove the Database. setSavepoint and Database. rollback.

C.

Change the CallousUtill .makeRestCallout to an @future method.

Expert Solution
Questions # 23:

How should a developer verify that a specific Account record is being tested in a test

class for a Visualforce controller?

Options:

A.

Insert the Account in the test class, instantiate the page reference in the test class, then use System.currentFageReference() .getFarameters() .put{) to set the Account ID.

B.

Insert the Account into Salesforce, instantiate the page reference in the test class, then use system. setFarentRecordId() .get() to set the Account ID.

{of Instantiate the page reference in the test class, insert the Account in

the test class, then use =seeAllData=trus to view the Account.

C.

Instantiate the page reference in the test class, insert the Account in

the test class, then use system.setFarentRecordrd() .get() to set the Account ID,

Expert Solution
Questions # 24:

Consider the queries in the options below and the following Information:

* For these queries, assume that there are more than 200,000 Account records.

* These records Include soft-deleted records; that is, deleted records that are still in the Recycle Bin.

* There are two fields that are marked as External Id on the

Account. These fields are customer_Number_c and ERR_Key_ s.

Which two queries are optimized for large data volumes?

Choose 2 answers

Options:

A.

SELECT I4 FROM Account WHERE Name !— NULL

B.

SELECT 1d FROM Accounts WHERE Name != '°

AND Customer_Number_c- "ValueA’

C.

SELECT ID FROM Account WHRE id IN :aListVariable

D.

SELECT Id FROM Account WHERE Name != ‘ ‘AND IsDeleted = false

Expert Solution
Questions # 25:

A developer built an Aura component for guests to self-register upon arrival at a front desk kiosk. Now the developer needs to create a component for the utility tray to alert users whenever a guest arrives at the front desk.

What should be used?

Options:

A.

DML Operation

B.

Changelog

C.

Application Event

D.

Component Event

Expert Solution
Questions # 26:

What should a developer use to query all Account fields for the Acme account in their sandbox?

Options:

A.

SELECT FIELDS FAOM Account WHERE Name = ‘Acme’ LIMIT 1

B.

SELECT FIELDS (ALL) FROM Account WHERE Name = ‘Acme’ LIMIT 1

C.

SELECT ALL FROM Account WHERE Name = "Acme’ LIMIT 1

D.

SELECT * FROM Recount WHERE Names = ‘Aeme’ LIMIT 1

Expert Solution
Questions # 27:

Refer to the Aura component below:

Question # 27

A developer receives complaints that the component loads slowly.

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

Options:

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.

Expert Solution
Questions # 28:

Which statement is true regarding savepoints?

Options:

A.

You can roll back to any savepoint variable created in any order.

B.

Static variables are not reverted during a rollback.

C.

Reference to savepoints can cross trigger invocations.

D.

Savepoints are not limited by DML statement governor limits.

Expert Solution
Questions # 29:

A developer needs to store variables to control the style and behavior of a Lightning Web Component.

Which feature can be used to ensure that the variables are testable in both Production and all Sandboxes?

Options:

A.

Custom setting

B.

Custom object

C.

Custom variable

D.

Custom metadata

Expert Solution
Questions # 30:

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?

Options:

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.

Expert Solution
Viewing page 3 out of 5 pages
Viewing questions 21-30 out of questions