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
1answer
41 views

How to Determine Whether a Field Can Be Updated in Trigger Context

My question is basically the same as question 289297, if I correctly understand its OP's intent. I am posting my own in the hope of giving the issue more visibility, and also because it is not an ...
0
votes
1answer
24 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 ...
1
vote
1answer
15 views

Field Level Security in Mulesoft using the user's sessionId in Salesforce connector

I am trying to perform a query in Anypoint Studio on the Account standard object. In the Salesforce standard connector 'Query' configuration I implemented the use of the user's sessionId. So if this ...
4
votes
1answer
62 views

Why is stripInaccessible removing an M-D field?

I am building and LWC which uses lightning-record-edit-form to create an object, then calls an Apex controller method to create a list of M-D children of the newly created object. In my current test, ...
4
votes
3answers
78 views

What is the risk of not performing Field Level Security (FLS) checks on internally developed Apex code?

I see more and more information about the importance of performing FLS checks before SOQL and DML operations, using the Security.stripInaccessible method, e.g. in the Winter '21 PD1 certification ...
-2
votes
1answer
24 views

How to fix FLS Create and FLS Update issue as per security scanner

String attachmentLinks = ''; if(!commAttList.isEmpty()){ Database.insert(commAttList,false); } return attachmentLinks;
1
vote
1answer
47 views

Checkmarx Security Scanner FLS Issues

I run the checkmarx scanner for app and received ~250 FLS issues, which is understood, because when the app developed it simply was not checked. However I have noticed that there are lots of cases ...
0
votes
1answer
20 views

How can I get all custom fields that are Hidden from all profiles?

I got responsibility for another SF instance. The objects all have 100's of fields, of which many are hidden from all users (historically, they would not delete the field, but hide it from all users - ...
0
votes
0answers
26 views

Custom Field marked as Read Only, appears editable on Page Layout

I have a Custom Field on Contact object which is marked as 'Read Only' + 'Visible' via Field Level Security. When I navigate to Contact Record Page, the field still appears to be editable. Screenshot ...
0
votes
0answers
26 views

Keeping a ViewAllData permissionset viewing all fields

I have a permissionset which I want to grant broad read-only access to nearly all fields and objects. I've granted the permissionset the ViewAllData permission already, but that permission does not ...
0
votes
1answer
24 views

Whats the most efficient way to build a FULL FLS perm set?

View All / Modify All system perms in no way interact with FLS. Yet there's also no convenient system permission to say 'this user should have read/edit ability for all field FLS', as far as I know. ...
0
votes
1answer
52 views

Error on upserting field permissions through apex

I am showing only permissionable and accessible fields of an object on the UI, then I am upserting the field permissions for the selected fields for custom permission set. It works fine for some ...
0
votes
0answers
58 views

Unlocked package - Including field security settings, page layout settings for a standard Salesforce profile to access/view a custom field

I have an unlocked package that adds custom fields to the Contact object. Some of these fields need to be made read-only. In my scratch org, I have modified the Salesforce Standard User profile to ...
0
votes
1answer
83 views

Field Level security disable field visibility

On Opportunity are two Custom Fields Product__c (controlling field) and Product_Type__c (Dependent Field) When i check the field level security on these fields, it is visible for all Profiles. I want ...
-1
votes
1answer
225 views

Apex Security rule Check of Soql/ DML [closed]

Trying to add Security Check on SOQL/ DML action in my Apex class. Gone through the following link https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/...
2
votes
1answer
19 views

Do compound field components have the same access?

Suppose I run the following code: String field1 = 'BillingCity'; String field2 = 'BillingState'; Boolean access1 = Schema.Account.getSObjectType().getDescribe().fields.getMap().get(field1).getDescribe(...
1
vote
1answer
361 views

Retrieve and Deploy Custom Fields with Profile FLS settings via SFDX

Is there a simple way to use the sfdx CLI to retrieve and deploy new custom fields from one org to another? Use case: Someone creates new custom fields in Production and want to deploy them easily to ...
3
votes
1answer
635 views

How to check edit access for LWC?

I am just going through the Summer 20 Release Notes and found an article - Check User Permissions for Lightning Web Components Here is the link Here I found, to check View Setup permission you just ...
0
votes
1answer
75 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
0answers
9 views

Edit Entitlement on Case

I am trying to edit Entitlement assignment on a Case, but I couldn't get write access for that field on a profile level, and through permission set. Is there any way to edit entitlement field on a ...
0
votes
1answer
125 views

Object and Field Permissions - Apex CRUD Violation

I have ran the Apex PMD, In my result in got the security error with the rule ApexCRUDViolation so I'm checking the field-level read permission for the selected field before querying as below. ...
0
votes
1answer
16 views

Access Aggregated Field Level Security for Offline-first App

We are currently building a page layout renderer for an offline application that would allow end-user to create records and then sync the data once they get access to internet again. We need to ...
2
votes
1answer
392 views

LWC - Bypass Field-Level Security using Lightning-Input-Field?

Is it possible to create an LWC input form that bypasses field-level security, while still leveraging the powerful UI brought by <lightning-input-field>? Im creating a generic filter component ...
0
votes
1answer
15 views

Disable Ability to Edit RecordType

I have a custom object with a Record Type that is read-only on the page layout but I can still make updates to the Record Type on the page. Why is this? I want to make the field un-editable, is there ...
0
votes
0answers
176 views

statusCode: 403 - CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY

I have site which will update the record in account object. (LWC with aura app) I'm getting Following error when i tried to update from public site with Guest user access. It's working when I'm ON in ...
0
votes
1answer
170 views

Deploy FLS settings for standard object's custom field in managed package

I've added a custom field to Activity object for using it during Task creation/updating from Apex code. By default when I deploy my project through SFDX this field has no FLS settings. In the result I ...
1
vote
0answers
27 views

Can you modify global action fields accessibility by profile?

Is it possible to make fields in a global quick action editable to some profiles and read-only to other profiles? For Example, I want profile1 to have access to editing certain fields, but profile2 ...
3
votes
2answers
228 views

Shortest and most efficient way to query ALL accessible fields of an object

Now that stripInaccessible() and WITH_SECURITY_ENFORCED are GA I wonder what is the most readable and efficient way to do a SELECT all_accessible_fields_for_user FROM AnyObject WHERE Id = ...
7
votes
1answer
291 views

What exception does Security.stripInaccessible throw?

This new security method Security.stripInaccessible both strips out fields that the user has no rights to and will throw an exception if the object-level permissions are being violated. What ...
8
votes
1answer
217 views

How to opt out of FLS validation when a SOQL query is run by a trigger?

I have a large Salesforce application with hundreds of SOQL queries. Currently, the code uses Schema.DescribeFieldResult data to determine if the logged in user has rights to each field in the SELECT ...
0
votes
1answer
95 views

CRUD & FLS - Trailhead

I'm passing the Data Leak Prevention module and have faced some misunderstanding here in this unit Controller: public with sharing class CRUD_FLS_Challenge { public List<Treasures__c> ...
1
vote
1answer
689 views

How to properly use stripInaccessible for PMD ApexCRUDViolation [closed]

On triggers I have some PMD ApexCRUDViolation errors. I see on the winter/spring 20 release notes a new apex function "stripinaccessible" to manage records/fields permissions. Could you have some ...
0
votes
2answers
35 views

Is there a way to read or set Field Level Security on ScorecardMetric object fields in Apex?

Is there a way to read or set Field Level Security on ScorecardMetric object fields in Apex? I can create a custom field on ScorecardMetric but can't use Apex to set FLS for this field.
2
votes
1answer
79 views

Not able to get Asset Level field permission through SOQL

I have a permission set named abc. Permission to Asset Level field for Asset object is defined like below in abc: I am trying to get field level permissions for abc permission set using the below ...
3
votes
0answers
32 views

Is there an alternative solution to prevent other profiles from seeing a certain profile's activites?

I have an original profile A A group of users wanted to go from profile A to a new profile called profile B that is an exact mirror of profile A. Profile B wants to create activities and task, but ...
0
votes
1answer
109 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 ...
0
votes
1answer
177 views

can you restrict edit access to a field after one time edited?

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 is restricted to all except Admin Profiles. Any ...
1
vote
0answers
21 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 ...
1
vote
1answer
93 views

Field Level Security on Email Template Not Working as Expected

I'm trying to hide specific fields in an email template for a specific profile. For this, I removed the field level access for fields I want to hide for the respective profile. After logging in as ...
3
votes
0answers
223 views

How to deploy FLS (Field Level Security) for all Objects & Fields in Scratch Org with application source push?

I'm trying to setup DX with Source code in Git and I'm pulling it from there and pushing it into a Scratch org. My Source code has multiple standard/custom objects with fields. But after Pushing code ...
2
votes
1answer
55 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 ...
0
votes
0answers
65 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 ...
4
votes
1answer
285 views

Apex Source Scanner flag CRUD/ FLS as security risk for no reason

I've been using FFLIB_SecurityUtils lib to enforce CRUD and FLS in my apex classes. I've no issues when running unit tests, but when submitting my code on Source Scanner for partners, i've several ...
0
votes
2answers
24 views

having trouble with field accessibility

I have multiple profile and 5 Record type. I am trying to give one record type "Bill to " from Profile " Technical Support User" but when i click on editable and uncheck visible option in PageLayout ...
0
votes
1answer
47 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
1answer
34 views

Object that contains Field Level Permissions for a Profile

I would like to bulk update the field level access for multiple profiles and multiple fields. What is the name of the sObject that contains field level permissions by profile? "FieldPermissions" ...
1
vote
0answers
32 views

CRUD/FLS Enforcement for configuration tables like FiscalYearSettings

Is Field Level Security enforcement a requirement for querying tables like 'FiscalYearSettings' and 'Period'? or only for tables like Opportunity and Contact. Our app need to display the fiscal year ...
2
votes
1answer
2k views

Enforce Field-Level Security Permissions for SOQL Queries WITH SECURITY_ENFORCED (Confused )

What is the need of WITH SECURITY_ENFORCED? Only benefit is minimal development experience with security and to applications where graceful degradation on permissions errors isn’t required. If ...
0
votes
1answer
27 views

Change Field Level Security on Custom Web Tabs?

I created a custom web tab: SF>Setup>Build>Create>Tabs>Web Tabs>New: And after it's created, when I go to Edit it, I can't change the visibility or field level security. Is this ...
0
votes
1answer
15 views

Site profile doesn't appear to have access to FirstName or LastName on Leads

I have created a public site to create Lead records. It seems as though the site's profile has access to the composite Name field but not the FirstName or LastName fields. Eg: //This doesn't Work ...