Exam Plat-Dev-301 Topic 1 Question 168 Discussion
Actual exam question for Salesforce's Plat-Dev-301 exam
Question #: 168
Topic #: 1
Question #: 168
Topic #: 1
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?
The following test fails:

What should be done to make this test pass?
Suggested Answer: B Vote an answer
To make the test pass, @isTest(SeeAllData=true) should be used to allow the test to access historical data from the org. This is required because field history tracking data is not copied to a test context, so you need to allow the test to access live data to assert against it.
by Tina at Aug 09, 2026, 02:35 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).