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
KuenKuen 

Python Beatbox saying External ID not found when it's correct in SalesForce

Anyone have any idea as to why it would say it can't find the Account, which I have linked to an external id?

 

Here's the error message. 

 

 

Contact  = {'LastName': u'Test', 'Account': 1L, 'type': 'Contact', 'FirstName': u'Akira', 'u_id__c': 2L}
beatbox.upsert('u_id__c',Contact)

 

[{'fields': [], 'message': 'The external foreign key reference does not reference a valid entity: Account', 'statusCode': 'INVALID_FIELD'}]"

 

Anyone have any idea? I have confirmed that there is an Account field, and the Account field, which is a foreign key field to Account, has an external Id that has the same ID as the one i'm providing it. Any suggestions on how to tackle this?

 

SuperfellSuperfell

So, you're trying to use the externalId on account to resolve the FK lookup from this row to the account? if so, you need to specify an actual account sobject, and populate the externalId field with the relevant value. This is not a python example, but there's an example at http://www.pocketsoap.com/weblog/2008/09/1824.html