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
0
votes
1answer
16 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 ...
0
votes
1answer
28 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
1answer
19 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 ...
0
votes
1answer
41 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 ...
1
vote
1answer
37 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....
1
vote
1answer
58 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 ...
0
votes
1answer
36 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 ...
0
votes
0answers
45 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 ...
0
votes
2answers
98 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
1answer
108 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:...
0
votes
2answers
53 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 ...
1
vote
0answers
75 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 ...
1
vote
1answer
190 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, ...
0
votes
1answer
368 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 ("...
0
votes
0answers
44 views

Setup Audit Trail: Custom metadata record updates are not tracked for one packaged mdt, but works for another one

We have two custom metadata objects inside our managed package installed into client's org. Both mdts are pretty similar - public with fields of different types (text, boolean, long text area), have ...
11
votes
0answers
145 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
1answer
78 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 ...
0
votes
0answers
22 views

SQL Query Activity into FLE Data Extension

SQL Query activities will insert the literal string into a data extension field, even if Field Level Encryption is enabled. I want to select data from a view and insert it into a data extension, while ...
1
vote
1answer
70 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
90 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
44 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
188 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
140 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
67 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
167 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
44 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
31 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
32 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
119 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
1answer
455 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
368 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
25 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
1k 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
2k 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 ...
1
vote
1answer
320 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
1answer
390 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
31 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 ...
4
votes
2answers
1k 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
19 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
1answer
384 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
288 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
553 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 = ...
8
votes
1answer
520 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 ...
9
votes
1answer
321 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
127 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
977 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
75 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
121 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
38 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
423 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 ...