According to this documentation, Permission Sets are defining the Field Level Security. But I'm experiencing odd behavior. I'm not having access to a field, that I should be able to edit, according to the Permission Set. But It will be available if I set the FLS to Visible on the field it self.

This outputs the fields that I have access to:

for(SObjectField field : SObjectType.Account.fields.getMap().values()) {
    System.debug(LoggingLevel.ERROR, field);

What am I missing? Permission Sets seem kind of useless here, cause if I set the FLS to Visible, every user with that profile has access. If it's hidden no one does, and the Permission Set can't override it.

Edit: Adding the field on the Profile did also make it available (without having it visible at FLS).

  • Do you mean that you set on PS field as editable, but not as readable? – kurunve Oct 26 '17 at 19:57
  • @kurunve no both. – Basti Oct 26 '17 at 20:01
  • can you elaborate "every user with that profile sees it"? Do you meen see's values of that field or it is shown as output to your apex script? – kurunve Oct 26 '17 at 21:21
  • @kurunve thanks,you are right, they have access in apex, didn't check the ui, I will edit the qestion – Basti Oct 26 '17 at 21:22
  • Please, check this article developer.salesforce.com/docs/atlas.en-us.apexcode.meta/… – kurunve Oct 26 '17 at 21:53

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.