- General Development
- Schema Development
- Apex Code Development
- Visualforce Development
- Formulas & Validation Rules
- Force.com Sites & Site.com
- Chatter Development
- Java Development
- .NET Development
- Perl, PHP, Python & Ruby
- Desktop Integration
- APIs and Integrations
- Visual Workflow
- Apple, Mac and OS X
- VB and Office Development
- AppExchange Directory & Packaging
- Salesforce Labs & Open Source Projects
- Other Salesforce Applications
- Jobs Board
01-15-2013 02:54 PM - edited 01-15-2013 02:57 PM
I'm writing a simple ETL tool that processes a bunch of data from our platform DBs, and adds members to Salesforce campaigns given the results of that analysis. To do this, I'm using the beatbox module and Python (2.7.3). (I didn't post to the Python board because it appears that this error is not specific to beatbox/Python.)
The issue is that roughly 5% of the records return an error: INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY:
- I CAN NOT tell what's different about the 5% that would cause the call to the API to fail.
- I CAN add the leads to campaigns manually.
- My account DOES HAVE sys admin privileges.
- All leads that I'm attempting to update DO EXIST.
Has anyone experienced similar errors?
Solved! Go to Solution.
01-16-2013 05:38 AM
There are many reasons why you get this error.
Here are the most frequent scenarios...
- Firstly , check the foreign key fields and check whether the user has access to those objects .
- Check whether the record type of that particular record is assigned to the user or not .
01-16-2013 06:34 AM
Thank you for your reply.
I'll look into the keys, but my account has "System Administrator" privileges, and unless that means something different in salesforce land, I should have read/write access to the whole DB.
Regarding record types. I have noticed that some of the failed records show up as "Contacts" and not "Leads" in the UI. I find this odd, because they have a LeadId associated with them anyway. I know this because the first step in my ETL is to query the lead table:
SELECT Email, Id FROM Lead WHERE (some condition)
So the question: does the above SOQL statement return only Leads (as I would expect querying the Leads table)? If a LeadID exists for any entity in the DB, is it safe to assume the entity is a "Lead"? Am I making any sense?
01-18-2013 06:59 AM
It was indeed an incorrect record type. Some of the Leads had been converted to Contacts, which was causing issues.
Thanks for your help!