Questions tagged [field-level-security]
Each Field within an Object has it's own CRUD (Create, Read, Update and Delete) security permissions applied to it. Field level security settings can make the security applied to a field more restrictive for a User's Profile beyond what Object level security would on it's own, but cannot make the security less restrictive.
201
questions
1
vote
1
answer
30
views
User can see a field that is not even inside the Page Layout
I have a custom object that a user accesses frequently.
Recently I received a report that this user was able to see too much fields, much more than usual.
I checked the permissions of this user. He ...
1
vote
1
answer
1k
views
Lock a Field on a Record based off of Profile
I have a field on a record that should only be editable by people with a certain profile. I can see that the read/edit is selected correctly under the field level security and I can see under the ...
1
vote
0
answers
35
views
Enforcing Field security in Apex - Schema.objectType.sobject_name.fields.field_name VS sobject_name.field_name.getDescribe() VS stripInaccessible()
Currently, there are at least four ways I am aware of to check/enforce Field Access while running Apex:
Calling sobject_name.field_name.getDescribe().isUpdateable();
Example: Account.Description....
0
votes
1
answer
828
views
Extract profile's field level security
Is there a way to get a profile's field level security?
I tried an soql query for FieldPermissions object but it's based off of permission sets so if there's no permission set with at least read ...
1
vote
1
answer
4k
views
Setting default RecordType on the permission set
I am trying to use permission sets to dictate what record type people have. The idea is I only assign one record type per permission set. So when a user creates a record they don't get the record ...
12
votes
1
answer
563
views
Is there a reliable way to have WITH SECURITY_ENFORCED applied to all queries?
I've just gone through a biggish code base making sure that WITH SECURITY_ENFORCED is set on every query. Most were, but for some recent additions, it hadn't been included. For managed packages that ...
0
votes
1
answer
800
views
Managed Package overriding Field level Security access
I'm having this issue
I have some custom fields imported from a managed package which I need to set to "Read only".
I have set the FLS to read only on these fields for all users but when I ...
2
votes
1
answer
227
views
Salesforce code analyzer DFA
Im hitting a strange error when running the salesforce code analyzer DFA report -
sf scanner run dfa --format csv --outfile CodeAnalyzerDFA.csv --target ./ --projectdir ./ --category Security
Scanner ...
2
votes
2
answers
398
views
Changing Field Level Security for Connection User in Salesforce to Saleforce
We are using Salesforce to Salesforce to share an object (Object A) with the target org. In the target org, the trigger for the object A is invoked and based on the received record, tries to update ...
-1
votes
1
answer
548
views
How to make a field readonly in lightning record page?
I have a field in field section in a lightning record page. I have set that field Read-Only in UI behaviour. But in UI, it is still editable.
Could Someone help me with this?
0
votes
0
answers
46
views
OWD and Profile Security Settings
I am facing an issue.
2 Custom objects Job(master) and Candidate (child).
Job - parent (OWD private) (Custom Profile permission - Read permission only)
Candidate - Child (OWD Controlled by parent) (...
0
votes
1
answer
813
views
How to change field level security of a field across all the profiles?
Is there an option to edit field level security of field across all the profiles at once ?
0
votes
1
answer
53
views
Field Level Permission Leakage to a profile
I have a Recruiter profile Which has field level permission for "Assigned Owner Field" is given only Visible Persmisson.But when a user Logins who is assigned Recruiter Profile is able to ...
2
votes
1
answer
141
views
Storing Encrypted Voucher Codes in Marketing Cloud
We are using a lot of vouchers in our marketing campaigns and usually, vouchers are uniquely assigned to a specific user when they are being issued on the back-end, and therefore no other user can ...
18
votes
2
answers
1k
views
How does Salesforce handle Managed Package Licences between Packages?
So I have a managed package we'll call Package Core. It has various components, incl custom fields on Account and Contact. It is licensed by user, and works as expected - no license, no access to the ...
-1
votes
1
answer
43
views
How to give access to only one field by a record owned by other user
I have a field that will only be edited when the process is finished, but the record owned by a person A and will be edited by a person B. I tryed a lot of things, but not work. I can’t change de owd. ...
1
vote
1
answer
867
views
Restrict access to specific fields when using Salesforce Integration User Licence on Standard objects (like Contacts)
By default, the Salesforce Integration User Licence doesn't provide access to a variety of standard objects (including Contacts and Accounts).
You can extend the access for an integration to those ...
0
votes
1
answer
154
views
Do I need to check FLS for each field when creating a new object record in apex?
If I am creating a new Contact record in apex, will the following code be sufficient for FLS/CRUD requirements in a security review, or will I need to check .isCreateable() for each field individually ...
0
votes
1
answer
74
views
Validate OWD, with sharing, Profile, Permission Sets as Non - ADMIN user
I am trying to validate the OWD for an object that is Public/Read Write without Read permission at the object level for a specific profile user. To validate the results I created a new profile by ...
-2
votes
1
answer
198
views
is sharing settings of parent object can affects the lookup on child object?
My org account object OWD is private.
And one of my Sales Rep. try to make an opportunity record and in lookup he wants the account record which he doesn't own. So , can he create opportunity related ...
-1
votes
1
answer
45
views
recordViewForm not pre-populating input fields for certain profiles in aura
I have an aura component with a recordViewForm that displays multiple fields from the Account object . These input fields are supposed to be pre-populated but are not displaying for a certain profile ...
1
vote
1
answer
4k
views
Getting "An internal server error has occurred" while trying to change Object Field Permissions in Permission Set
I started getting the "An internal server error has occurred" error when I try to change Object Field Permission in a Permission Set in my Dev Org.
So when I am in a Permission Set and try ...
1
vote
1
answer
1k
views
Can you restrict edit access to a field once it is populated?
I am working on a Picklist requirement which needs to give Edit access to all by default.
Once any value is entered by any user, edit access should be restricted to all except Admin Profiles.
Any ...
2
votes
1
answer
3k
views
Guest User not able to get data from custom object
I am having simple custom object(Resources) with out any relation ship and having only one field (Resource Name)
I am trying to access the data inside this custom object through APEX and the user is ...
0
votes
0
answers
370
views
Is it possible to limit the fields you can filter on list views?
I ran into a very basic request at first that now I am struggling with, so hope to get my curiosity cleared with this query:
I've limited the user's profile visibility in the Campaign object to not ...
8
votes
1
answer
8k
views
For SOQL queries, can "WITH USER_MODE" safely replace "WITH SECURITY_ENFORCED"?
When performing static or dynamic SOQL queries, should WITH SECURITY_ENFORCED now be replaced with WITH USER_MODE? Under what conditions, if any, should WITH SECURITY_ENFORCED still be used given ...
0
votes
1
answer
218
views
Cannot find field level permissions on standard field
I am having some SOQL queries fail when I include the field "Street" when querying for a Lead. This is the kind of query I'm running and the error message back:
SELECT Id, Name, firstName, ...
4
votes
1
answer
220
views
Is the User Mode approach to object and field security acceptable in a security review?
This Enforce User Mode for Database Operations looks by far the cleanest approach to implement the object and field-level security that is required to pass a Salesforce AppExchange Security Review.
(...
0
votes
1
answer
1k
views
How to determine fields for which a given profile does not have read permission
Full disclosure, my expertise is not on the Salesforce side, but in .NET and SQL; however, I've been tasked with assisting my company with a data migration from our original org to a new one. The in-...
2
votes
1
answer
4k
views
Easiest way to grant edit access to a field for one user on case object without creating a new profile?
I was curious if anyone knew the easiest way to grant edit access to a field for one user on case object without creating a new profile? I am using an existing profile that has cred setup to allow ...
1
vote
2
answers
3k
views
How to check field accessiblity of a field that is related to the object being checked
While developing secure controller actions for a Lightning Component, I ran across an issue checking accessibility for an Account level attribute related a Contact.
For example:
Schema.SObjectType....
0
votes
1
answer
418
views
How to set field level security on new field with simple_salesforce
I'm working in Python with the simple_salesforce library.
I can create new fields on my Account and Contact objects, based on info in How to update object description using simple_salesforce.
...
1
vote
0
answers
84
views
Checkmarx reporting wrong function name?
I just ran a Checkmarx scan today. It reported the following Apex Serious Security Risk:
You can see the report is making a reference to isCreatable(). However, the name of the method in my Apex code ...
0
votes
0
answers
243
views
Running Salesforce Code Analyzer for method version 3
I'm trying to run the SalesForce Code Analyzer on the new version 3 to a unique method called deleteQuery and the deleteQuery has a parameter Id here what I'm using: "sfdx scanner:run:dfa --...
3
votes
0
answers
378
views
Best practices for pushing objects through DevOps?
We are using DevOps to push changes from sandboxes through to Production.
Recently, I attempted to deploy some significant changes to an object. This includes:
Creation of record types
New fields
...
1
vote
1
answer
1k
views
Update field permission in permission set via Apex
I am trying to expose a REST API so the field permission of permission set(s) can be updated.
I am trying to use MetadataService as below:
@RestResource(urlMapping='/updateFieldPermission')
global ...
12
votes
2
answers
37k
views
Make a button on a layout be visible only to a specific group of users
If I want a specific field to be visible only to a specific user or group of users on a layout, I set up field-level security for this field. I want to be able to do the same for my custom button ...
1
vote
2
answers
473
views
Hide PII in Contact Record for a specific Profile
I created a "Read Only" custom profile. I have a "Private" Record Type for the Contact Object. I would like to hide PII fields in the "Private" contact records for the &...
0
votes
1
answer
2k
views
Why can't I remove access for that specific field in a profile?
I have a custom object "Ticket" and I want to remove "Edit Access" for a standard profile "Standard Platform User" for the field "Approved To Start Work" but I ...
1
vote
2
answers
241
views
How do I determine by Apex code if Custom Field allows setting Field Level Security and if can be edited?
To assign correct FLS permissions in bulk for a given profile I need to know which fields are readonly and which fields support Field Level Security.
I see that there is field IsFlsEnabled in ...
3
votes
2
answers
2k
views
How do you configure Field Level Security for Custom settings in managed package?
I can't seem to find this configuration in the User Profile settings.
0
votes
0
answers
9k
views
secure query included inaccessible field
I have a test method which I am trying to run from a particular profile. I am trying to access an object called Interaction and that profile has real all record permission.
When I am running the first ...
0
votes
0
answers
386
views
Fields been made non editable for a custom profile using Field level security, but user can still edit the field
We are using multiple profiles and needs to make few fields in Opportunity as view only - non editable field. We have made the required changed in field level security of the profile, and also done ...
1
vote
1
answer
222
views
FIeld hidden by FLS no longer returns records when search terms match?
When FLS hides a field from a user, the search results would still return the record if the search term matched.
https://success.salesforce.com/answers?id=9063A000000DcyUQAS
This no longer seems to ...
-2
votes
1
answer
1k
views
How can I restrict access of an Account object field according to the user role? [closed]
It is pretty straightfoward. I want to hide/restrict some standard fields from the Account object based on the user's role. Is it possible to achieve? If so, how?
0
votes
1
answer
454
views
Read only field access for fields that are required
I have a "software license" object that should be readable by a customer community plus user except for one field that should be editable.
Set up
The default external sharing setting for ...
0
votes
1
answer
406
views
Service Cloud field "PersonMailingAddress" not available in Marketing Cloud
We have set the Marketing Cloud Connector with Service Cloud, and when i want to select fields in the Account Object I do not find the PersonMailingAddress.
The field is a combination of the mailing ...
1
vote
1
answer
149
views
Does SOAP callout to MetadataService not updating Schema before the end of transaction?
I'm using MetatadaService class from https://raw.githubusercontent.com/financialforcedev/apex-mdapi/master/apex-mdapi/src/classes/MetadataService.cls, which I have updated to 53.0 version.
I'm trying ...
4
votes
1
answer
7k
views
WITH SECURITY_ENFORCED and Security.stripInaccessible in a single SOQL
Premise: I followed WITH SECURITY_ENFORCED, Security.stripInaccessible and comparison before designing my Apex class for querrying a few records.
Doubt:
I implemented my SOQL as
Security....
0
votes
1
answer
366
views
Quick Action Visibility that references User checkbox doesn't work - appears to obey FLS?
Video demonstration: https://www.screencast.com/t/k55kD1BE4
Can a field that is hidden via FLS not be used to dynamically display a quick action under visibility on a custom object via App Builder ...