function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
AlbertoKiteAlbertoKite 

Update/insert FirstName/LastName on Person Account with DataLoader11.0

I've the following problem:
I need to do an upsert operation on fields FirstName and LastName with ApexDataloader11.0 on a Person Account.
I map FirstName and LastName whit my csv Column but when I run the upsert I got the following error message:
 
"Account: bad field names on insert/update call: FirstName, LastName"
 
It seems that ApexDataloader11.0 doesn't support Person Account Field for upsert/insert operation
 
If I do an extract operation with the same fields and with ApexDataloader11 It run succesfully
 
Please Help me
It's very important for me
 
Thanks
AlbertoKiteAlbertoKite

I found the reason of the error:

If I use fields that are "Person Account Fields" I need to specify also that the recordTypeId for the Account = Person Account RecordType in the mapping, because these fields are available only for that recordtype.

I hope this will be an useful information for all.

 

 

 

RickyGRickyG
Thank you very much for posting the solution.  Your action helps the community, and we appreciate it!
Ron WildRon Wild
So, how does that figure into creating a person account through the api?

Do we add the RecordTypeId field to the new account object before inserting it to enable setting the person contact fields?

If so I haven't been able to get it to work...

Code:
  $createFields = array (
  'RecordTypeId' => '012400000005NSQAA2',
     'IsPersonAccount' => true,
         'FirstName' => $_REQUEST['first_name'],
         'LastName' => $_REQUEST['last_name'],
  'Company_Name__c' => $_REQUEST['company'],
  'Phone' => $_REQUEST['phone'],
  'Email' => $_REQUEST['email'],
  'Title' => $_REQUEST['title'],
  'MailingStreet' => $_REQUEST['street'],
  'MailingCity' => $_REQUEST['city'],
  'MailingState' => $_REQUEST['state'],
  'MailingPostalCode' => $_REQUEST['zip'],
  'MailingCountry' => $_REQUEST['country'],
  'LeadSource' => "Website Registration",
  'Description' => $_REQUEST['description'],
  'IsPersonAccount' => true,
  'HasOptedOutOfEmail' => ($_REQUEST['subscribe']—"false":"true")
        );
    
  $sObject = new SObject();
  $sObject->fields = $createFields;
  $sObject->type = 'Account';
  $createResult = $sfProxy->mySforceConnection->create(array($sObject));

 

Jayesh KapadeJayesh Kapade
Hello Everyone,
I'm stuck in the given scenario can anybody please help me to sort out the issue.
so the scenario is like I'm trying to import 500 records into an account object through the data import wizard.
but the thing is I have a column in my CSV file i.e. name and the value of the field is "jayesh,kapade"
so the question is I need to import this data into the single account field in the account object.