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
Sarah HumphreysSarah Humphreys 

Error message when trying to create a new Opportunity in Sandbox

I'm trying to create a new Opportunity in Sandbox mode and all of a sudden I'm getting an error message:
Error: Invalid Data. 
Review all error messages below to correct your data.
Apex trigger kell01.CreateDefaultAllocation caused an unexpected exception, contact your administrator: kell01.CreateDefaultAllocation: 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: a1Ei00000003MUL: []: (kell01)

What is causing this?
Vishal Negandhi 16Vishal Negandhi 16
In your trigger, there's an error where you are referencing a wrong record (object) for a lookup value. 
If you share your code for the trigger 'kell01.CreateDefaultAllocation', people here would be easily able to help you out. 
Sarah HumphreysSarah Humphreys
Where do I find the code?
Ulas KutukUlas Kutuk
You are having an issue in your trigger. You are probably referencing wrong lookup field. find the related trigger and see lookup assignments