4

Let's say I have a Profile in the system which has a particular Field of an Object set as Read-Only.

How does this affect my Apex code and Workflows if they are executed by a User with this Profile? Will Apex and Workflows be able to edit the Read-Only field, or will it throw an error?

1 Answer 1

6

Apex and Workflows function independently of field level security; see the documentation for considerations for workflows and Field level security.

So Apex code and workflows will be able to read and write to fields that could be hidden or read only for the user.

To be abundantly clear, using with sharing on your class definition does not change anything about this. That annotation only limits the rows a user can see, not the columns. Also; see the documentation

2
  • Does your answer apply if I set the with sharing on my Apex class?
    – smukov
    Commented Aug 3, 2016 at 6:26
  • I've updated my answer to answer that specifically. Commented Aug 3, 2016 at 7:28

You must log in to answer this question.

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