+ Start a Discussion
Sarvesh9Sarvesh9 

I am not able to access fields of Account Object inside Developer Console

Sample code written in Anonymous Window :

Account acc = new Account();
acc.Name = 'XYZ';
insert acc;

The error is shown as :
Line: 2, Column: 3, Variable does not exist: Name

Same problem is occuring with all the fields of Account object.
Rest of the object fields can be accessed using the same method.

Please Help
 
Best Answer chosen by Sarvesh9
Dilip_VDilip_V
Hi Sarvesh,

Looks like you have a class with the name as 'Account' please rename it and try to execute code.

Let us know if it works.

If it works mark it as the best answer.

Thanks. 

All Answers

Dilip_VDilip_V
Hi Sarvesh,

Looks like you have a class with the name as 'Account' please rename it and try to execute code.

Let us know if it works.

If it works mark it as the best answer.

Thanks. 
This was selected as the best answer
Sarvesh9Sarvesh9
Thanks a lot Thermo Dynamics.
I had a blank class in my Org.
Problem solved :)