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

Changed PDII Exam Questions

Page: 4 / 13
Total 193 questions

Salesforce Certified Platform Developer II (SU24) Questions and Answers

Question 13

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

Question 14

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 15

Universal Containers stores user preferences in a hierarchy custom setting,

user Prefs_c, with a checkbox field, show _help co. Company-level defaults are

stored at the organizational level, but may be overridden at the user level. If a user

has not overridden preferences, then the defaults should be used.

How should the show_Help_ c preference be retrieved for the current user?

Options:

A.

Boolean show = User_Prefa_ c.getValuea().Show_Help_ co;

B.

Boolean show =

User Prefs c.getValues(UserInfo.getUserid{)).Show_Help c;

C.

Boolean show = User_Prefs_c.getlnstance(].Show Help c;

D.

Boolean show = User Prefs_c.show Melp_c;

Question 16

A company needs to automatically delete sensitive information after seven years.

This could delete almost a million records every day.

How can this be achieved?

Options:

A.

Schedule an 3fuzure process to query records older than seven years, and then recursively invoke itself in 1,000 record batches to delete them,

B.

Use aggregate functions to query for records older than seven years, and then delete the aggrigateResults objects.

{civ [+] Schedule a batch Apex process to run every day that queries and deletes records older than seven years.

C.

Perform a SOSL statement to find records older than 7 years, and then delete the entire result set.

Page: 4 / 13
Total 193 questions