Twice now I have observed the following strange behavior: a user, with a non sysadmin profile, is not able to save edits to an Account, although he should be entitled to. Message is "Insufficient privileges". Unexplicable, since the user has always been able to edit Accounts. So, just to get things done, I as a sysadmin made the change for him, successfully of course. And, guess what, after that, the user is able to edit and save the same Account!

The first time, I thought it's just a bug in Salesforce. But after the second time, I am getting suspicious. I just can't understand why the user gets an error the first time, but not after I have edited it. The only thing I can think of is that some trigger fires some Apex class, to which the user doesn't have access. And that the trigger is fired on that first edit, but not on the second. But as far as I can tell he has access to the appropriate classes. And: if a trigger calls a class, I don't think that access to the class even matters.

The user is not the owner of the account, but has access to it via his profile (view and modify all Accounts).

  • Try checking sharing button and see from where user is getting the access to the Account.
    – Raul
    Dec 20, 2016 at 9:28
  • 1
    Try using the debug log to see if a trigger is firing on the first edit.
    – Dave Humm
    Dec 20, 2016 at 9:57

1 Answer 1


This is too long to be comment

I do belive that the user does not have edit access to the record before it is edited by system administrator.

Please run this query in you Developer Console or Workkbench

SELECT RecordId, HasReadAccess, HasEditAccess, HasDeleteAccess, MaxAccessLevel 
     FROM UserRecordAccess
     WHERE UserId = '[single ID]'
     AND RecordId = '[single ID]' 

Now edit the record by system admin and run the same query again. Ideally the values for this query should change.

If yes, there may be a sharing rule which runs to provide the access to the user.

  • Why should an edit action by sysadmin change the access rights for another user? I don't understand. Maybe it wasn't obvious from the question, but the problem is not reproducible. Dec 20, 2016 at 10:41
  • Maybe it triggers a sharing rule.
    – manjit5190
    Dec 20, 2016 at 11:05

You must log in to answer this question.

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