Summer Certification Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code = getmirror

Pass the Salesforce Developers PDII Questions and answers with ExamsMirror

Practice at least 50% of the questions to maximize your chances of passing.
Exam PDII Premium Access

View all detail and faqs for the PDII exam


726 Students Passed

90% Average Score

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

Refer to the test method below''

Question # 21

The test method calls a web service that updates an external system with Account

information and sets the Accounts integration_Updated__c checkbox to True when it completes.

The test fails to execute and exits with an error: "Methods defined as TestMethod do

not support Web service callouts.”

A)

Question # 21

B)

Question # 21

C)

Question # 21

D)

Question # 21

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Questions # 22:

A developer creates a Lightning web component to allow a Contact to be quickly entered. However, error messages are not displayed.

Question # 22

Which component should the developer add to the form to display error messages?

Options:

A.

apex:messages

B.

lightning-messages

C.

lightning-error

D.

aura:messages

Questions # 23:

An org has a requirement that addresses on Contacts and Accounts should be normalized to a company standard by Apex code any time that they are saved.

What is the optimal way to implement this?

Options:

A.

Apex triggers on Contact and Account that call a helper class to normalize the address

B.

Apex trigger on Account that calls the Contact trigger to normalize the address

C.

Apex triggers on Contact and Account that normalize the address

D.

Apex trigger on Contact that calls the Account trigger to normalize the address

Questions # 24:

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.

Questions # 25:

Refer to the test method below:

Question # 25

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?

Options:

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.

Questions # 26:

Universal Charities (UC) uses Salesforce to collect electronic donations in the form of credit card deductions from individuals and corporations.

When a customer service agent enters the credit card information, it must be sent

to 8 3rd-party payment processor for the donation to be processed, UC uses one

payment processor for individuals and a different one for corporations.

What should a developer use to store the payment processor settings for the

different payment processors, so that their system administrator can modify the

settings once they are deployed, if needed?

Options:

A.

Custom object

B.

Custom metadata

C.

Hierarchy custom setting

D.

List custom setting

Questions # 27:

For compliance purposes, a company is required to track long-term product usage in their org. The information that they need to log will be collected from more than one object and, over time, they predict they will have hundreds of millions of records.

What should a developer use to implement this?

Options:

A.

Setup audit trail

B.

Field audit trail

C.

Big objects

D.

Field history tracking

Questions # 28:

A developer is asked to look into an issue where a scheduled Apex is running into DML limits. Upon investigation, the developer finds that the number of records processed by the scheduled Apex has recently increased to more than 10,000.

What should the developer do to eliminate the limit exception error?

Options:

A.

Use the @future annotation.

B.

Implement the Qususabls interface.

C.

Implement the Batchable interface.

D.

Use platform events.

Questions # 29:

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.

Questions # 30:

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

Viewing page 3 out of 5 pages
Viewing questions 21-30 out of questions
TOP CODES

TOP CODES

Top selling exam codes in the certification world, popular, in demand and updated to help you pass on the first try.