Reply
Contributor
BenTheMan
Posts: 4
0
Accepted Solution

Very confusing INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY errors

[ Edited ]

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?

 

See also: http://stackoverflow.com/questions/14348369/insufficient-access-on-cross-reference-entity-errors-fro...

Regular Contributor
Rakesh2020
Posts: 43
0

Re: Very confusing INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY errors

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 .

Contributor
BenTheMan
Posts: 4
0

Re: Very confusing INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY errors

Hi Rakesh:

 

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?

Regular Contributor
Rakesh2020
Posts: 43
0

Re: Very confusing INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY errors

Yes, That SOQL returns only the lead records.

Contributor
BenTheMan
Posts: 4
0

Re: Very confusing INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY errors

Rakesh:

 

It was indeed an incorrect record type. Some of the Leads had been converted to Contacts, which was causing issues.

 

Thanks for your help!

Regular Contributor
Rakesh2020
Posts: 43
0

Re: Very confusing INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY errors

Good to hear, Please mark my reply as solution for the benefit of others.