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

I believe you might have found the answer yourself. But I recently had the same issue too.

The problem seems to be related to either two of those:

  1. The layout assigned to the user is wrong. If so, then the field might not be on the layout that the user is observing.
  2. The permission set was deployed but the platform did not recalculate the permissions. Try to click "Edit" on the permission set page, and then "Save". It might force Salesforce to recalculate permissions, and the user will likely see the field.
  • 1
    Hi Renato, I tried to verify your approach, but I have not even been able to reporduce my issue. Maybe they fixed it (post ist 2 years old) or maybe I had a lack of understanding back then. Regarding your answer, it works for me even without beeing added to any layout. – Basti Oct 10 '19 at 13:03

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.