You need to sign in to do that
Don't have an account?
Neha Sameen 1
"Variable does not exist: Name" for account object
I am getting "Variable does not exist: Name" for account object. For as far i know, for field "AccountName" field name is "Name". Then why i m getting this error. Please help.
Could you please share the code snipt by which I can take a look into it?
Thanks
Ankit Maheshwari
public static Account insertNewAccount(String name) {
Account acc = new Account();
acc.Name = name;
try
{
insert acc;
} catch (Exception e) {
return null;
}
return acc;
}
}
error is "Variable does not exist: Name"
Account acct = new Account();
acct.Name = 'Test';
From execute anonymous window, but getting the same error