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
vinni shreevinni shree 

EXCEPTION_THROWN [4]|System.DmlException: Insert failed. First exception on row 0; first error: INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY, insufficient access rights on cross-reference id: []

Hi,

Can anyone please help what this error means. I didn't understand and stuck on this.

I'm getting this for pricebook and product object related code

 EXCEPTION_THROWN [4]|System.DmlException: Insert failed. First exception on row 0; first error: INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY, insufficient access rights on cross-reference id: []

Thank you

Best Answer chosen by vinni shree
VinayVinay (Salesforce Developers) 
Hi Vinni,

INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY, insufficient access rights on cross reference id is a common issue when you try to update or create data with insufficient access on a record. 

This error normally happens when a DML operation is performed. Meaning that, whenever an Insert or Update is performed. You won't see this error when you save your APEX class or TRIGGER, because this error happens at RUNTIME.

https://help.salesforce.com/s/articleView?id=000385619&type=1

Please mark as Best Answer if above information was helpful.

Thanks,