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 votes
0 answers
18 views

how to set field level validation using recordEditForm

I'm unable to write field level validation using recordeditform using guest user in salesforce, onchange function is also not working <lightning:inputField fieldName="Phone" required=&...
user avatar
0 votes
0 answers
108 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 ...
user avatar
  • 507
0 votes
0 answers
32 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 ...
user avatar
  • 13
0 votes
0 answers
26 views

How can I set the Field-Level Security of a field that is hidden from the admin?

In my organization, some objects were created but hidden for the System Admin profile. Doing the manual process is impossible due to the amount of fields that are hidden. So I'm trying to make a ...
user avatar
-2 votes
1 answer
81 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?
user avatar
0 votes
1 answer
81 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 ...
user avatar
  • 29
0 votes
1 answer
30 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 ...
user avatar
  • 149
0 votes
1 answer
56 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 ...
user avatar
0 votes
1 answer
1k views

gets “System.QueryException: Insufficient permissions: secure query included inaccessible field” error

We have a query that is executed by an “experience site/community” user. The user has “Partner Community” license and “Partner Community User” profile. This user executes code containing the following ...
user avatar
1 vote
1 answer
513 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....
user avatar
  • 405
1 vote
1 answer
69 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 ...
user avatar
0 votes
1 answer
77 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 ...
user avatar
  • 889
0 votes
0 answers
108 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 ...
user avatar
0 votes
2 answers
716 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 ...
user avatar
2 votes
1 answer
233 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:...
user avatar
  • 130k
0 votes
2 answers
186 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 ...
user avatar
1 vote
0 answers
133 views

FLS and CRUD Check for Platform event and Meta Data DML

This might be a silly question, but don't want to get caught under security review. I have three questions/confirmations related to the security review FLS/CRUD Check Needed while publishing platform ...
user avatar
1 vote
1 answer
463 views

System Administrator can not see custom field even when FLS is configured correctly

My user has the System Administrator profile. When I go to Object Manager > Task > Fields and Relationships I can only see standard fields, but not any of the custom fields that this object has, ...
user avatar
0 votes
1 answer
750 views

Why do Object Permissions in Permission Set override Field Permissions in this case?

I'm having an issue where I want a user with an assigned permission set to be able to see fields in an object ("Read" Permission in Object Level), but I want 2 fields to be hidden ("...
user avatar
  • 125
11 votes
0 answers
183 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 ...
user avatar
  • 130k
0 votes
1 answer
133 views

Not able to view few fields in campaign object in workbench

I am trying to enable the field-level permission of few fields of the Campaign object in salesforce so that I can view them in workbench but unfortunately, after enabling the field level access it is ...
user avatar
  • 197
1 vote
1 answer
91 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 ...
user avatar
  • 163
0 votes
1 answer
182 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 ...
user avatar
  • 1
1 vote
1 answer
56 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 ...
user avatar
4 votes
1 answer
257 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, ...
user avatar
4 votes
3 answers
163 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 ...
user avatar
  • 903
-2 votes
1 answer
108 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;
user avatar
1 vote
1 answer
251 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 ...
user avatar
  • 1,545
0 votes
1 answer
169 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 - ...
user avatar
  • 5,445
0 votes
0 answers
36 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 ...
user avatar
0 votes
1 answer
42 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. ...
user avatar
  • 3,462
0 votes
1 answer
155 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 ...
user avatar
  • 943
0 votes
1 answer
682 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 ...
user avatar
-1 votes
1 answer
426 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/...
user avatar
2 votes
1 answer
30 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(...
user avatar
1 vote
1 answer
2k 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 ...
user avatar
  • 4,702
3 votes
1 answer
3k 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 ...
user avatar
1 vote
1 answer
454 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 ...
user avatar
  • 3,179
0 votes
1 answer
492 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. ...
user avatar
0 votes
1 answer
38 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 ...
user avatar
  • 4,310
4 votes
2 answers
2k 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 ...
user avatar
0 votes
1 answer
20 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 ...
user avatar
  • 3,179
0 votes
1 answer
504 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 ...
user avatar
1 vote
0 answers
424 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 ...
user avatar
3 votes
2 answers
728 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 = ...
user avatar
8 votes
1 answer
628 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 ...
user avatar
  • 130k
9 votes
1 answer
412 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 ...
user avatar
  • 562
0 votes
1 answer
142 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> ...
user avatar
  • 687
1 vote
1 answer
1k 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 ...
user avatar
  • 125
0 votes
2 answers
102 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.
user avatar
  • 13.3k