0

Is there a way I can give my users the ability to create notes but not be able to edit or delete them? I don't want any user (even sysadmin) to be able to edit or delete any notes made.

1 Answer 1

1

No, you can't change permissions on Notes, as they do not have individual object permissions, but you can block any normal attempt at doing so:

trigger ProtectNote on Note (before update, before delete) {
    for(Note record: Trigger.new==null? Trigger.old: Trigger.new) {
        record.addError('You may not edit or delete a note.');
    }
}

Note that cascade deletes won't be protected (e.g. deleting the account a note is attached to will delete the note), but it will protect any direct attempt to modify or delete a note.

2
  • I like this answer, however then when you are doing Lead conversion this is fired causing an error and keeping the user from converting leads. Whats a good work around to that? Commented Jul 31, 2015 at 14:13
  • @Brohibition Actually, it doesn't fire (out of the box). You have a trigger that's causing a cascade update somehow. You should be able to modify the trigger(s) to not fire on conversion, probably by setting a flag or something. I can't give you an exact answer because it depends on the code causing the update.
    – sfdcfox
    Commented Jul 31, 2015 at 15:40

You must log in to answer this question.

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