+ Start a Discussion
Gauri kavitkar 8Gauri kavitkar 8 

First error: Insert failed. First exception on row 1; first error: INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY, Insufficient access on the entity.: []

Hi All,
I am trying to share custom object record from one Salesforce account to another salesforce account throgh poral user and i am getting this error while sharing Data.
I already check profile setting and give read,create,edit access.still i am getting this issue
AshlekhAshlekh
Hi,
This type of exception come when a record is created for a other user and on that record also have a reference of other record on which that user doesnot have access.

-Thanks
Ashlekh Gera
NickCANickCA

For others looking for an answer to a similar problem that throws this error, I realized that when I was in my Sanbox environment, somehow some Lookup IDs from our Production instance had been copied over, but obviously you're not allowed to refer to something in Production from the Sandbox since there has to be a unique record in the Sandbox. 

That said, ensure that you're not using IDs for records from your Production instance anywhere in your process or that none of the Objects you're attempting to insert or update have any IDs that refer to or lookup something in your Production instance.


In my case, I was trying to insert a list of Products from a Price Book into an Opportunity on our Sandbox instance, but the Products had IDs on them that were only available for data in our Production instance, so it could be as deep down the rabbit hole as that.