3 edited tags
| link
2 deleted 158 characters in body; edited tags
source | link
System.DmlException: Insert failed. First exception on row 0; first error:
 INVALID_FIELD_FOR_INSERT_UPDATE, Account: bad field names on insert/update call: 
LastName, FirstName: [LastName, FirstName]

System.DmlException: Insert failed. First exception on row 0; first error: INVALID_FIELD_FOR_INSERT_UPDATE, Account: bad field names on insert/update call: LastName, FirstName: [LastName, FirstName]

I am facing above error:

Account acc = new Account();
                        if(nameParts[0] != null)
                            acc.FirstName=nameParts[0];
                        if(nameParts[1] != null)
                            acc.LastName=nameParts[1];

                        acc.PersonEmail=caseObj.SuppliedEmail;                         
                        acc.Phone = caseObj.SuppliedPhone;
                        acc.recordTypeId = personAccountRecordType.Id;
System.DmlException: Insert failed. First exception on row 0; first error:
 INVALID_FIELD_FOR_INSERT_UPDATE, Account: bad field names on insert/update call: 
LastName, FirstName: [LastName, FirstName]

I am facing above error:

Account acc = new Account();
                        if(nameParts[0] != null)
                            acc.FirstName=nameParts[0];
                        if(nameParts[1] != null)
                            acc.LastName=nameParts[1];

                        acc.PersonEmail=caseObj.SuppliedEmail;                         
                        acc.Phone = caseObj.SuppliedPhone;
                        acc.recordTypeId = personAccountRecordType.Id;

System.DmlException: Insert failed. First exception on row 0; first error: INVALID_FIELD_FOR_INSERT_UPDATE, Account: bad field names on insert/update call: LastName, FirstName: [LastName, FirstName]

I am facing above error:

Account acc = new Account();
if(nameParts[0] != null)
    acc.FirstName=nameParts[0];
if(nameParts[1] != null)
    acc.LastName=nameParts[1];

acc.PersonEmail=caseObj.SuppliedEmail;                         
acc.Phone = caseObj.SuppliedPhone;
acc.recordTypeId = personAccountRecordType.Id;
1
source | link

INVALID_FIELD_FOR_INSERT_UPDATE, Account: bad field names on insert/update call: LastName, FirstName: [LastName, FirstName]ge

System.DmlException: Insert failed. First exception on row 0; first error:
 INVALID_FIELD_FOR_INSERT_UPDATE, Account: bad field names on insert/update call: 
LastName, FirstName: [LastName, FirstName]

I am facing above error:

Account acc = new Account();
                        if(nameParts[0] != null)
                            acc.FirstName=nameParts[0];
                        if(nameParts[1] != null)
                            acc.LastName=nameParts[1];

                        acc.PersonEmail=caseObj.SuppliedEmail;                         
                        acc.Phone = caseObj.SuppliedPhone;
                        acc.recordTypeId = personAccountRecordType.Id;