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
Brandon PolingBrandon Poling 

insufficient access rights on cross-reference id: 001S000000m96Jq

Hey All,

I am receiving the following error when attempting to insert a contact on an account through an API call.

insufficient access rights on cross-reference id: 001S000000m96Jq

If it helps, I am using the Enterprise Edition and am currently testing this out on my sandbox account.

The account ID is valid and I am pointing to the profile of the System Administrator, which has access to "modify all data", is API Enabled, owns the account I'm trying to update, and has access to all record types of Accounts & Contacts.

What am I missing?
Abilash Kosigi 8Abilash Kosigi 8
Hi Brandon,

The contact standard object has several fields with a lookup on various other objects.
The following fields are a few.

AccountName -- Lookup(Account)
Contact Owner -- Lookup(User)
Reports To -- Lookup(Contact)

In the database, an account name associated with the contact is stored in the form of an id.
Hence, when you insert a contact, the correspoding account id should be already present in the system.
If this is not present, we face this error.

Same is the case for all the other lookup fields and master detail fields.

Hope this clarified your question. Please mark this as best answer if it is so.
Brandon PolingBrandon Poling
Thanks Abilash,

The Account ID that the error is referencing is already present in my sanbox account. Are you saying that If we don't specify the "contact owner" & "reports to" ID when attempting to insert this contact, we will receive this error? 
Abilash Kosigi 8Abilash Kosigi 8
Yes Brandon, that could also be a possibility. Check for them as well.

Hope this clarified your question. Please mark this as best answer if it is so :)
Abilash Kosigi 8Abilash Kosigi 8
I am sorry I interpretted your reply wrongly. If the contact owner or reports to or any other lookup field is blank -- then it would not be a problem. But, if an Id is given to them which is not present in the environment, that would cause this error.