You need to sign in to do that
Don't have an account?
Sami Cohen
List Problem
Hi all,
Recently, we encoutered new problem in List iteration.
The following code generates an exception saying that the element "d" is null :
We resolved the bug by inserting a "If" condition before performing any operation into the loop.
Is is very strong!!!!
Any comment?
Recently, we encoutered new problem in List iteration.
The following code generates an exception saying that the element "d" is null :
Code:
for(Opportunity d : [select name from opportunity]) { // do something with d }
We resolved the bug by inserting a "If" condition before performing any operation into the loop.
Is is very strong!!!!
Any comment?
So you are trying to access a null object then it will show an error.