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
Catherine Bell 7Catherine Bell 7 

INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY, insufficient access rights on cross-reference id:

Hi

One profile does cannot convert Leads in UAT and Production. Is this an access issue on the profile or something on the Opportunity Triggers?

Sys Admin (me) can convert leads fine

error that the user recieves
"Error: There was an error converting the lead. Please resolve the following error and try again: OpportunityTriggers: execution of AfterInsert caused by: System.DmlException: Insert failed. 
First exception on row 0; first error: INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY, insufficient access rights on cross-reference id: 0065D000002VBSk: [] Class.OLOpportunityTeamCreator.createOppTeamMemberForOL: 
line 50, column 1 Class.OpportunityAfterInsertTriggerHandler.mainEntry: line 18, column 1 Class.TriggerDispatcherBase.execute: line 117, 
column 1 Class.OpportunityTriggerDispatcher.afterInsert: 
line 63, column 1 Class.TriggerFactory.execute: line 51, column 1 Class.TriggerFactory.createTriggerDispatcher: line 21, column 1 Trigger.OpportunityTriggers: line 90, column 1

Error within the debug log
"16:50:35.208 (2588613820)|EXCEPTION_THROWN|[50]|System.DmlException: Insert failed. First exception on row 0; first error: INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY, insufficient access rights on cross-reference id: 0065D000002VEvz: []
16:50:35.208 (2589179967)|HEAP_ALLOCATE|[50]|Bytes:174
16:50:35.208 (2589213069)|METHOD_EXIT|[18]|01p6F000006HWOz|OLOpportunityTeamCreator.createOppTeamMemberForOL(List<Opportunity>)
16:50:35.208 (2589228466)|METHOD_EXIT|[117]|01p6F000006SKst|OpportunityAfterInsertTriggerHandler.mainEntry(TriggerParameters)
16:50:35.208 (2589240942)|METHOD_EXIT|[63]|01p6F000006SKt2|TriggerDispatcherBase.execute(ITriggerHandler, TriggerParameters, TriggerParameters.TriggerEvent)
16:50:35.208 (2589250299)|METHOD_EXIT|[51]|01p6F000006SKsy|OpportunityTriggerDispatcher.afterInsert(TriggerParameters)
16:50:35.208 (2589265855)|METHOD_EXIT|[21]|01p6F000006SKt4|TriggerFactory.execute(ITriggerDispatcher)
16:50:35.208 (2589274199)|SYSTEM_MODE_EXIT|false
16:50:35.208 (2589287768)|METHOD_EXIT|[90]|01p6F000006SKt4|TriggerFactory.createTriggerDispatcher(Schema.SObjectType)
16:50:35.208 (2589388541)|FATAL_ERROR|System.DmlException: Insert failed. First exception on row 0; first error: INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY, insufficient access rights on cross-reference id: 0065D000002VEvz: []"

I have looked at Triggers as listed in the debug log, but i am not sure exactly what i am looking for.  I don't see reference ot the profile anywhere
01p6F000006HWOz|OLOpportunityTeamCreator.createOppTeamMemberForOL(List<Opportunity>)
01p6F000006SKst|OpportunityAfterInsertTriggerHandler.mainEntry(TriggerParameters)
01p6F000006SKt2|TriggerDispatcherBase.execute(ITriggerHandler, TriggerParameters, TriggerParameters.TriggerEvent)
01p6F000006SKsy|OpportunityTriggerDispatcher.afterInsert(TriggerParameters)
01p6F000006SKt4|TriggerFactory.execute(ITriggerDispatcher)

i have debug logs for the profile that is failing 

i have debug logs for me that are allowing to convert the Lead.

what is the best way to figure out where i need to change the access?  The logs are long and this is my first time looking at debug logs. 

UAT refresh Dec 22nd - only change in environments

thank you
Cat




 
shailesh_rawteshailesh_rawte
Hi  Catherine Bell 7,


Just look into above link.
https://salesforce.stackexchange.com/questions/12772/why-am-i-getting-insufficient-access-on-cross-reference-entity-error-on-code-tha


Thanks,
Shailesh Rawte
 
Santosh Reddy MaddhuriSantosh Reddy Maddhuri
Go to that related profile and give read/edit access for Leads, Opptys, Contacts and Accounts.