INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY, insufficient access rights on cross-reference id:[] - Answers - Salesforce Trailblazer Community
Ask Search:
Yeshi MohammedYeshi Mohammed 

INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY, insufficient access rights on cross-reference id:[]

Hi,
I just copied from our production org to my dev org (sandbox) . I created account ,opportunity, contact and tried to fulfill an order the way we do in production but I get "INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY, insufficient access rights on cross-reference id:[]" error.

It fails on " Insert Renewal " which is part of the process , the system createn a renewal opportunity for the order fulfilled. Renewal == opportunity. I have Admin access , I checked that I have access to opportunity record types. I have not changed anything since copy is completed.
What else do I need to check ?
Thanks You. 
Best Answer chosen by Yeshi Mohammed
Martin KeatingMartin Keating
Do you have hardcoded Ids to either a Record Type or specific record in anything in your changeset that was moved over? Seems like it could be likely:

http://salesforce.stackexchange.com/questions/12772/why-am-i-getting-insufficient-access-on-cross-reference-entity-error-on-code-tha

All Answers

Martin KeatingMartin Keating
Do you have hardcoded Ids to either a Record Type or specific record in anything in your changeset that was moved over? Seems like it could be likely:

http://salesforce.stackexchange.com/questions/12772/why-am-i-getting-insufficient-access-on-cross-reference-entity-error-on-code-tha
This was selected as the best answer
Tusar PanigrahiTusar Panigrahi
It seems you do not have access to one of the records in the process. Please review all the involved records and. See you have access. Are you getting this as a sys admin?
Naval SharmaNaval Sharma
You may have some process builder which is triggering this error.
Yeshi MohammedYeshi Mohammed
Thank you so much Martin Keating , your response made me to look deeper. There were no hard coded Ids directly on the code but I went and looked at the code line by line ( renewal.CampaignId = System.label.CustomerManagementCampaign;) , Custom lable had id from production. when  I replaced with my dev org id , it worked.

Thanks You All
 
Tom ConnollyTom Connolly
Thought I would share my experience in case it helps save someone!  I was developing a flow to create a custom object record for use by our community users.  These users are NOT plus users in case you are curious.  The custom object has a Master Detail relationship to the account object.  I first checked that the user profile had permission to read and edit both the custom object and account object which they did.  I then checked Sharing setting which were fine. In the end it was the Communities Settings where we had to add Read/Write access to the user for the Account object.  This is of course dangerous if you don't want to provide them with edit capabilities on certain fields but it resolved my error.  I had to create Validation rules so that the user doesn't change their account name! hope it helps
Susmitha Reddy Y RSusmitha Reddy Y R
Thank you Tom Connolly, your post has solution to issue I am facing while creating a record from communities.