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

PDII Premium Exam Questions

Page: 6 / 12
Question 24

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?

Options:

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.

Question 25

A developer created an Opportunity trigger that updates the account rating when an associated opportunity is considered high value. Current criteria for an opportunity

to be considered high value is an amount greater than or equal to $1,000,000. However, this criteria value can change over time.

There is a new requirement to also display high value opportunities in a Lightning web component.

Which two actions should the developer take to meet these business requirements, and also prevent the business logic that obtains the high value opportunities from

being repeated in more than one place?

Choose 2 answers

Options:

A.

Call the trigger from the Lightning web component.

B.

Create a helper class that fetches the high value opportunities,

C.

Leave the business logic code inside the trigger for efficiency.

D.

Use custom metadata to hold the high value amount.

Question 26

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?

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

Question 27

A developer is trying to access org data from within a test class.

Which sObject type requires the test class to have the (seeAllData=true)

annotation?

Options:

A.

User

B.

RecordType

C.

Report

D.

Profile

Page: 6 / 12
Exam Code: PDII
Exam Name: Salesforce Certified Platform Developer II (SU24)
Last Update: Dec 22, 2024
Questions: 193
PDII pdf

PDII PDF

$25.5  $84.99
PDII Engine

PDII Testing Engine

$28.5  $94.99
PDII PDF + Engine

PDII PDF + Testing Engine

$40.5  $134.99