You need to sign in to do that
Don't have an account?
Aidel Bruck
INVALID_FIELD_FOR_INSERT_UPDATE, Account: bad field names on insert/update call: Name: [Name]
This is the error i am getting when I run this
static Account createNewaccount()
{
Account newaccount= new Account(Name= 'test');
newaccount.RecordTypeID= '012A0000000E3yA';
insert newaccount;
return newaccount;
}
static Account createNewaccount()
{
Account newaccount= new Account(Name= 'test');
newaccount.RecordTypeID= '012A0000000E3yA';
insert newaccount;
return newaccount;
}
Then you should use FirstName and LastName
instead of Name
All Answers
Do you have Person Account Enabled in your Account?
Try Like below.
static Account createNewaccount()
{
Account newaccount= new Account();
newaccount.RecordTypeID= '012A0000000E3yA';
newaccount.Name= 'test';
insert newaccount;
return newaccount;
}
still getting this error
Is the above one Business Account Id?
Then you should use FirstName and LastName
instead of Name