0

I have a use case where some Apex code will need to run as a user with this profile. I am updating some fields in this code and then performing an update on the contact that's associated with this user. However, the DML update throws the following error.

System.DmlException: Update failed. First exception on row 0 with id 0030t00000mAa8oAAC; first error: INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY, insufficient access rights on cross-reference id: []

I'm assuming this is because the user this is running as does not have the proper permissions. I've given them read/write access to this field via field-level security and when I go to the sharing settings for this profile it shows read, write, and edit access to the contact object, so I'm not sure where to go from here.

1 Answer 1

0

I resolved this by changing my Apex class declaration from public with sharing to public without sharing.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .