+ Start a Discussion
Padmashree MPadmashree M 

Illegal assignment from List<Account>

when i used below code in execute anaonymous window, facing error like List<Account> Acc=[SELECT Id,name From Account];

facing error like : 
Illegal assignment from List<Account> to List<Account>

Please someone help on this
AnkaiahAnkaiah (Salesforce Developers) 
Hi Padmashree,

Same query working for me without any error.

In your organization somewhere you have created a class named "Account". Thats why the compiler is not able to understand that it is standard Object Account or the class created by you. Please rename your class, it will work.

If this helps, Please mark it as best answer.

The TechieThe Techie

oriao tineeoriao tinee
Chipotle Menu Prices – Chipotle is a fast-casual dining restaurant that mainly serves Mexican-inspired foods such as tacos and burritos. chipotlemenupricesinfo