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.

Filter by
Sorted by
Tagged with
1 vote
1 answer
3k 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 ...
18 votes
2 answers
912 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
32 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
241 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
53 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 ...
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 ...
0 votes
1 answer
44 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 ...
0 votes
1 answer
1k views

Contact Email field not queryable in SOQL

I'm querying contact email field in apex class and saving the return record inside a list. but when I debug the list queried then it does not show the email field. Below is the SOQL which I'm using ...
-2 votes
1 answer
48 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
23 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 ...
0 votes
1 answer
759 views

soql on events, to display all the events regardless of who is assigned to in a VF page within a community

I am not sure if I am approaching my problem the right way, maybe not, so I will give a very brief explanation of what I am trying to achieve: Currently I have 2 communities, Community 1 is focused ...
1 vote
1 answer
721 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
995 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 ...
1 vote
1 answer
2k 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
157 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 ...
7 votes
1 answer
3k 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
71 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, ...
3 votes
1 answer
166 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
276 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-...
0 votes
0 answers
83 views

How can I restrict the user from Editing the Account Site Field of account Object using profile settings?

I am facing some issue here regarding field level security in Profile Sales Admin (Cloned From System Administrator) Object Level Security (Standard object permission) Account Object | Only Read ...
1 vote
1 answer
2k 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
187 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
60 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
183 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
245 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 ...
0 votes
1 answer
589 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
35k 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
295 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
483 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 ...
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
204 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
5k 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
312 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
174 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
950 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
294 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
265 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
138 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 ...
3 votes
1 answer
5k 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
290 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 ...
4 votes
1 answer
220 views

Unable to simulate FLS/CRUD security leaks although no checks in code

I recently checked my managed package using the Force.com Security chechker (by Checkmarx) and the tool listed a few CRUD and FLS issues in my Controller classes. Before fixing them I tried to better ...
0 votes
0 answers
321 views

Changing field level permissions using REST API

My goal is to change field level permissions using REST API. I'm trying to use API's in order to create a new field on Lead object and then write to it. That's the API call I used in order to create a ...
1 vote
2 answers
4k views

Permission Set does not override Field Level Security?

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 ...
0 votes
2 answers
6k views

What is isCreatable and isUpdateable for FIELDS in GUI

Where can I find and enforce "CREATABLE" and "UPDATEABLE" options for fields? Because, i am able to check the permissions in Apex(below statements) whereas, not able to find what ...
2 votes
1 answer
742 views

Field level security pain in Apex tests when using packaging 2

In line with current security standards, we use with security_enforced extensively in our code. When doing CI (Continuous Integration) builds or working interactively we use sfdx force:user:permset:...
8 votes
3 answers
9k views

Set Field Level security for profile using meta-data api

I am using meta-data api to create custom fields in java class. Now I want to set field level security for different profiles. First is it possible to set this with meta-dat api, If yes than how can I ...
0 votes
2 answers
1k views

Why FirstName, LastName, Company field not found in FieldPermission query result?

I'm trying to get all fields and its read and write permission using below query SELECT Field, PermissionsRead, PermissionsEdit FROM FieldPermissions WHERE SObjectType ='Lead' AND parentId IN ( SELECT ...
3 votes
3 answers
7k views

How to pass Schema.SObjectType to a class method as an argument?

In an effort to write reusable code, I am trying to move my field-level security check code into a common class/methods. Because the Schema.SObjectType is dynamic, I am looking for a way to pass ...