You need to sign in to do that
Don't have an account?
Manish Anand 10
Error-Loop must iterate over a collection type: Account
Hi,
I am trying simple example of SOQL, to diaplay name of all the accounts, using below statements:-
Account act = [Select name from Account];
for (List <Account> a: act)
{
system.debug('Account Name'+ a);
}
It thorws an error-Loop must iterate over a collection type: Account
What, I am missing here?
I am trying simple example of SOQL, to diaplay name of all the accounts, using below statements:-
Account act = [Select name from Account];
for (List <Account> a: act)
{
system.debug('Account Name'+ a);
}
It thorws an error-Loop must iterate over a collection type: Account
What, I am missing here?
All Answers
*Like my post if it helps..Happy Coding :-)
Try this one..
Thanks,
Parteek
Regards,
Manish