Error when saving new Person Account - "Account: bad field names on insert/update call: FirstName LastName"

  • 1
  • Problem
  • Updated 4 years ago
  • Solved
I'm getting the following error when saving a new Person Account

"Account: bad field names on insert/update call: FirstName LastName" 

I'm filling in First Name and Last Name, but not Account Name. A standard SFDC page will show Account Name in View mode, but First Name and Last Name in Edit mode. First and Last are then concatenated into the Account Name behind the scenes. 

I have tried filling in the Account Name in addition to First and Last, and also just Account name by itself. No difference in the error message.


Photo of Peter Rozek

Peter Rozek

  • 190 Points 100 badge 2x thumb

Posted 4 years ago

  • 1
Photo of Zach McElrath

Zach McElrath, Employee

  • 49,014 Points 20k badge 2x thumb
Have you added a Condition on the Account model to specify its RecordTypeId? If you do not set a RecordTypeId, and specifically set the RecordTypeId to a Person Account Record Type, then I'm guessing what's happening is the Record Type is defaulting to a Business Account Record Type, which would explain the error message you're getting.
Photo of Peter Rozek

Peter Rozek

  • 190 Points 100 badge 2x thumb
Yes, that was the problem.  

I was thinking it was specified when I selected it (via the SFDC user interface) and also didn't realized that on a new page a condition was setting a value. I had the query mentality going on . 

Thanks!