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 5 out of 5 pages
Viewing questions 41-50 out of questions
Questions # 41:

A Visualforce page contains an industry select list and displays a table of Accounts that have a matching value in their Industry field.

Question # 41

When a user changes the value in the industry select list, the table of Accounts

should be automatically updated to show the Accounts associated with the selected

industry,

What is the optimal way to implement this?

Options:

A.

Add an <apex:actionsupport> within the <apex:selectOptions>.

B.

Add an <apex:actionFunction> within the <apax:selecList>.

C.

Add an <apex:actionsupport> within the <apex:selecList>.

D.

Add an <apex:actionFunction> within the <apex:selectOptions>.

Expert Solution
Questions # 42:

A developer creates an application event that has triggered an infinite loop.

What may have caused this problem?

Options:

A.

The event is fired from a custom renderer.

B.

The event has multiple handlers registered in the project.

C.

The event handler calls a trigger.

D.

An event is fired ‘ontouchend'’ and is unhandled.

Expert Solution
Questions # 43:

A developer created a JavaScript library that simplifies the development of repetitive tasks and features and uploaded the library as a static resource called rsutils in Salesforce. Another developer is coding a new Lightning web component (LWC) and wants to leverage the library,

Which statement properly loads the static resource within the LWC?

Options:

A.

import jsUtilities from ‘@salesforce/rescurceUr1/jaUtiles’;

B.

C.

const jsUtilivy = SA.get{'SResource.isUtils');

D.

impore {jsUtilities} from ‘@salasforce/resourceUrl/jsUtils’;

Expert Solution
Questions # 44:

Which technique can run custom logic when a Lightning web component is loaded?

Options:

A.

Use an <aura:handler> init event to call a function.

B.

Use the randersd loack { } method.

C.

Call 52. engqueusiction and pass in the method to call.

D.

Use the connectedCallback { } method.

Expert Solution
Questions # 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:

Question # 45

What should be done to make this test pass?

Options:

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

Expert Solution
Questions # 46:

Universal Containers (LIC) wants to develop a customer community to help their customers log issues with their containers. The community needs to function for their German- and Spanish-speaking customers also. UC heard that it's easy to create an international community using Salesforce, and hired a developer to build out the site.

What should the developer use to ensure the site is multilingual?

Options:

A.

Use custom labels to ensure custom messages are translated properly.

B.

Use custom settings to ensure custom messages are translated properly.

C.

Use custom objects to translate custom picklist values.

D.

Use custom metadata to translate custom picklist values.

Expert Solution
Questions # 47:

A developer wrote a trigger on Opportunity that will update a custom Last Sold Date

field on the Opportunity's Account whenever an Opportunity is closed. In the test

class for the trigger, the assertion to validate the Last Sold Date field fails.

What might be causing the failed assertion?

Options:

A.

The test class has not defined an Account owner when inserting the test data.

B.

The test class has not implemented seealldata=true in the test method.

C.

The test class has not re-queried the Account record after updating the Opportunity.

D.

The test class is not using System. runs () to run tests as a Salesforce administrator.

Expert Solution
Questions # 48:

Consider the following code snippet:

Question # 48

A developer created the following test class to provide the proper code coverage for the snippet above:

Question # 48

However, when the test runs, no data is returned and the assertion fails.

Which edit should the developer make to ensure the test class runs successfully?

Options:

A.

Implement the without sharing keyword in the searchFeaturs Apex class.

B.

Implement the seeAllData=true attribute in the @1sTest annotation.

C.

Enclose the method call within Test. startbest i) and @Test_stopTast |).

D.

Implement the setFixedSearchResult= method in the test class.

Expert Solution
Questions # 49:

Assuming the CreateOneAccount class creates one account and implements the

Queueable interface, which syntax properly tests the Apex code?

A)

Question # 49

B)

Question # 49

C)

Question # 49

D)

Question # 49

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Expert Solution
Questions # 50:

Universal Containers needs to integrate with their own, existing, internal custom web application. The web application accepts JSON payloads, resizes product images, and sends the resized images back to Salesforce.

What should the developer use to implement this integration?

Options:

A.

An Apex trigger that calls an @future method that allows callouts

B.

A platform event that makes a callout to the web application

C.

A flow that calls an @future method that allows callouts

D.

A flow with an outbound message that contains a session ID

Expert Solution
Viewing page 5 out of 5 pages
Viewing questions 41-50 out of questions