Is it possible to have event(trigger) when user without access to specific account trying to edit the record and get the insufficient privileges message?

It seems not, as such action doesn't run triggers. Seems that SF checking the privileges before running any other logic, but I'm wondering if someone had similar requirement and how it can be handle?

Only W/A I can think is to expand the sharing setup (perhaps set the object as public read/write), and then check the access in trigger.

  • 1
    What are you trying to accomplish? – sfdcfox Dec 11 '16 at 21:03
  • I want to detect case when user trying to edit record that he is not supposed to edit... The sharing setup will block him, but I want to sent email alert in this event – Liron C Dec 11 '16 at 21:12
  • You might be able to use Transaction Security with a policy on resource access. Although I think that is limited to connected apps. – Daniel Ballinger Dec 11 '16 at 21:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.