Salesforce Certified Platform Developer II — Question 11

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?

Answer options

Correct answer: A

Explanation

The correct answer is A, Report, because accessing Reports in test classes requires the (seeAllData=true) annotation due to their reliance on org-wide data that is not available by default. The other options, User, Profile, and RecordType, can be accessed without this annotation as they are generally available in test contexts.