1

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).

6
  • Do you mean that you set on PS field as editable, but not as readable?
    – kurunve
    Oct 26, 2017 at 19:57
  • @kurunve no both.
    – itsmebasti
    Oct 26, 2017 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, 2017 at 21:21
  • @kurunve thanks,you are right, they have access in apex, didn't check the ui, I will edit the qestion
    – itsmebasti
    Oct 26, 2017 at 21:22
  • Please, check this article developer.salesforce.com/docs/atlas.en-us.apexcode.meta/…
    – kurunve
    Oct 26, 2017 at 21:53

2 Answers 2

2

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
  • 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.
    – itsmebasti
    Oct 10, 2019 at 13:03
0

You might try this. Appears that Permission Sets do override Field Accessibility but not Read Only fields on the Page Layout level.

https://help.salesforce.com/s/articleView?id=000317301&type=1

1
  • 2
    Welcome to Salesforce Stack Exchange (SFSE). Thank you for a helpful contribution. However, for various reasons. link-only answers may be deleted. From How do I write a good answer?: "Links to external resources are encouraged, but please add context around the link so your fellow users will have some idea what it is and why it’s there. Always quote the most relevant part of an important link, in case the external resource is unreachable or goes permanently offline." [emphasis mine] Please edit your answer to add context.
    – Moonpie
    Sep 24, 2021 at 15:38

You must log in to answer this question.

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