Winter Special Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: bigdisc65

PDII Exam Dumps - Salesforce Developers Questions and Answers

Question # 44

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?

Options:

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.

Buy Now
Question # 45

A developer is writing a Jest test for a Lightning web component that conditionally displays child components based on a user's checkbox selections.

What should the developer do to properly test that the correct components display and hide for each scenario?

Options:

A.

Create a new describe block for each test.

B.

Reset the DOM after each test with the after Each() method.

C.

Add a teardown block to reset the DOM after each test.

D.

Create a new jsdom instance for each test.

Buy Now
Question # 46

Universal Containers uses a custom Lightning page to provide a mechanism to perform a step-by-step wizard search for Accounts. One of the steps in the wizard is to allow the user to input text into a text field, ERF Number_c, that is then used in a query to find matching Accounts.

Which step should be taken to resolve the issue?

Options:

A.

Perform the SOQL query as part of a for loop.

B.

Mark the ERP_Numker = field as an external 10.

C.

Mark the ERP_Number__ c field as required.

D.

Move the SO0L query to within an asynchronous process.

Buy Now
Question # 47

Which statement is considered a best practice for writing bulk safe Apex triggers?

Options:

A.

Add records to collections and perform DML operations against these collections.

B.

Add LIMIT 50000 to every SOQL statement.

C.

Perform all DML operations from within a future method.

D.

Use the Database methods with allorNone set to £21s= instead of DML statements.

Buy Now
Question # 48

A company has many different unit test methods that create Account records as

part of their data setup. A new required field was added to the Account and now all

of the unit tests fail.

What is the optimal way for a developer to fix the issue?

Options:

A.

Add the required field to the data setup for all of the unit tests.

B.

Add a before insert trigger on Account to set the value of the required field,

C.

Change the required field to be a validation rule that excludes the System Administrator profile.

D.

Create a TestDataFactory class that serves as the single place to create Accounts for unit tests and set the required field there.

Buy Now
Question # 49

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.

Buy Now
Question # 50

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

Options:

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.

Buy Now
Question # 51

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?

Options:

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.

Buy Now
Question # 52

A company manages information about their product offerings in custom objects named Catalog and Catalog Item. Catalog Item has a master-detail field to Catalog, and each Catalog may have as many as 100,000 Catalog Items.

Both custom objects have a CurrencylsoCode text field that contains the currency

code they should use. If a Catalog's CurrencylsoCode changes, all of its Catalog

Items’ CurrencylsoCodes should be changed as well.

What should a developer use to update the CurrencylsoCodes on the Catalog Items

when the Catalog's CurrencylsoCode changes?

Options:

A.

A Database.Schedulable and Database.Batchacle class that queries the Catalog Item object and updates the Catalog Items if the Catalog CurrencylSoCode is different

B.

An after insert trigger on Catalog that updates the Catalog Items if the Catalogs CurrencylsoCode is different

C.

An after insert trigger on Catalog Item that updates the Catalog Items if the Catalog’s CurrencylsoCode is different

D.

A Database. schedulable and Dazabase.Bazchacle class that queries the Catalog object and updates the Catalog Items if the Catalog CurrencylSoCode is different

Buy Now
Question # 53

Consider the controller code below that is called from an Aura component and

returns data wrapped in a class.

The developer verified that the queries return a single record each and there is error handling in the Aura component, but the component is not getting anything back when calling the controller getSemeData.

‘What is wrong?

Options:

A.

Instances of Apex classes, such as MyDatsWrapper, cannot be returned to a Lightning component.

B.

The member's Name and option should not have getter and setter.

C.

The member's Name and option should not be declared public.

D.

The member's Kame and option of the class MyDataWrapper should be annotated with @AuraEnabled also.

Buy Now
Exam Code: PDII
Exam Name: Salesforce Certified Platform Developer II (WI25)
Last Update: Feb 20, 2025
Questions: 196
PDII pdf

PDII PDF

$29.75  $84.99
PDII Engine

PDII Testing Engine

$33.25  $94.99
PDII PDF + Engine

PDII PDF + Testing Engine

$47.25  $134.99