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
stibbettstibbett 

Upsert Person Account, not recognizing external relationship field

Hi - I have a custom backend that's syncing contacts to Salesforce.  We recently enabled Person Accounts, and now I'm looking to update the sync mechanism to support this.

I'm working with the NodeJS library jsforce, and using the Bulk API.  I have an external ID field on Contact, "MyExtID__c" which shows up on Account as "MyExtID__pc", so I'm using that as the extIdField when creating the job:

var job = conn.bulk.createJob("Account", "upsert", {
        extIdField: "CSTool_ID__pc",
      });
When I run it, the bulk job creation fails with this message:

"Field name provided, MyExtId__pc does not match an External ID, Salesforce Id, or indexed field for Account".

When I look at the fields on Account in the Object Manager, I see the MyExtId__pc field, and it's marked as an external ID.  Not sure what I'm doing wrong here.

I'm guessing it's some limitation on person accounts, like that the external ID must be a field of Account and not the associated Contact, or maybe that you just can't upsert a Person Account. 

Has anyone successfully done this or have any suggestions for things I can try?

Thanks
 
VinayVinay (Salesforce Developers) 
Hi,

Review below links which can help you and give more information.

https://help.salesforce.com/articleView?id=account_person_behavior.htm&type=0
 https://salesforce.stackexchange.com/questions/46901/creating-a-person-account-in-salesforce-using-the-rest-api
 http://www.salesforcegeneral.com/salesforce-articles/inserting-person-account-records-via-api.html
 https://salesforce.stackexchange.com/questions/262892/personassistantname-field-unavailable-to-api-in-person-account
 
 Thanks,
Vinay Kumar
stibbettstibbett
Hey Vinay, Thanks for that - 

I looked through the links and none of them mentions external IDs or upserting - did I miss something?

Thanks
 -- Steve
 
VinayVinay (Salesforce Developers) 
I believe you might need to use Last Name, Person Account Record ID, Contact fields.

Since Dataloader uses API mechanism can you try to update 1 record so that it will be clear on field mappings.

http://www.salesforcegeneral.com/salesforce-articles/inserting-person-account-records-via-api.html

Thanks,
Vinay Kumar