You need to sign in to do that
Don't have an account?
Phuc Nguyen 18
test class update field error
Hello All,
I have a test class where I am updating a checkbox. In the Apex Class this would create 2 new records. The tets class fails when I perform the update. The record I am updating exist since I checked in an assertion so not sure why I am getting an error:
Attempt to de-reference a null object.
Would that tyupe of error message be due to information missing in my test data or the creation of the neww records?
Cheers,
P
"Attempt to de-reference a null object" error comes when we try to access some fields or values/data from a variable which is null.
Error should also provide line number and stack trace which can help in locating null variable.
Thanks