You need to sign in to do that
Don't have an account?
INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY
Hello All,
I am getting an issue while updating user object from Gold Partner User profile. This issue will come after winter 14 salesforce upgrade. Previously it is working fine. Please let me know if you have workaround for this issue. Tried with without sharing in the class level and other ways to overcome the issue but could't find the fix.
Sample Code:
@future
public static void disableUser(Set<ID> userIds)
{
List<User> lstusers = [Select id from User where id in: userIds];
for(User u : lstusers)
{
u.isActive = false;
}
update lstusers;//throwing error
From Debug log:
04:31:04.056 (56044017)|EXCEPTION_THROWN|[708]|System.DmlException: Update failed. First exception on row 0 with id 005F0000002F981IAC; first error: INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY, insufficient access rights on cross-reference id: []
04:31:04.056 (56953655)|FATAL_ERROR|System.DmlException: Update failed. First exception on row 0 with id 005F0000002F981IAC; first error: INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY, insufficient access rights on cross-reference id
It seem like you have no access to users make sure by checking your profile.
Best Regards
IQRAR AHMED