Exam PDII Topic 4 Question 66 Discussion
Actual exam question for Salesforce's PDII exam
Question #: 66
Topic #: 4
Question #: 66
Topic #: 4
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?
Which sObject type requires the test class to have the (seeAllData=true) annotation?
Suggested Answer: C Vote an answer
The seeAllData=true annotation is used to allow a test class to access all data in the org, instead of using test data that is created in the test class or by using test setup methods. This annotation should be used sparingly and only when absolutely necessary, as it can make the test class dependent on the data in the org and cause unexpected failures or unreliable results. The seeAllData=true annotation is required for some sObject types that do not support test data creation, such as Report, Dashboard, Document, and Attachment. Therefore, if the test class needs to access a Report sObject, it must use the seeAllData=true annotation. Reference: [Isolation of Test Data from Organization Data in Unit Tests], [Using the seeAllData Annotation]
by Cathy at Oct 06, 2026, 03:30 AM
0
0
0
10
Comments
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
Report Comment
Commenting
You can sign-up / login (it's free).