+ Start a Discussion
stibbettstibbett 

Upserting 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: "MyExtID__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
stibbettstibbett
I've tried using both MyExtID__c and MyExitId__pc as the names for the external ID field .. interestingly they give me slightly different errors:

Field name provided, MyExtID__c does not match an External ID for Account
Field name provided, MyExtID__pc does not match an External ID, Salesforce Id, or indexed field for Account