function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
JayNicJayNic 

Can I restrict a client System Administrator field access in a manager package?

I'm writing a managed package, and I'm using a number of fields that are controlled by the system and written to from apex.

Of course, I can restrict access to the fields via a profile, but I don't know how this works with System Administrators in the client's org.

My question is: If I mark a field in my Managed Package as readonly to a system administrator profile, and subsequently deploy that profile when installing the package in a Client's org: Will the system administrator be able to write to that field?

Additionally: Will the client org be able to write their own apex to write to that field?

How do you guys deal with this?

ps: also posted on Stackexchange: http://salesforce.stackexchange.com/questions/33062
aalbertaalbert
Sounds like you might want to use a Protected Custom Setting. If you have a protected custom setting in a managed package, it can only be access by your code.