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
8
votes
1answer
83 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
36 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
58 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 ...
1
vote
1answer
48 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
27 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
21 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
22 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
16 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
27 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 ...
1
vote
0answers
29 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
43 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
18 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
150 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
0answers
16 views

Lead Status and custom field not viewable and editable in VF page for other profile

I have a VF Page for Update of Mass Lead. There are 2 profiles, "Profile X" and "Profile Y". In the "Profile X", I can view and edit the standard field Lead Status and custom field Lead Status Reason. ...
0
votes
2answers
23 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
42 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
32 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
31 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 ...
1
vote
1answer
635 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
0answers
27 views

Is it possible to select which fields are shared with connected organisation for records shared programmatically using S2S?

If I want to share an object, but not all of its fields, for example, and I also do not want to share all the records, just a subset of them. For the later, I know it is possible to use the ...
0
votes
1answer
22 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
9 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 ...
1
vote
1answer
419 views

Is it possible to use Lightning Data Services \ <force:recordData without sharing rules \ field level security?

It is possible to declare a Apex controller class as public without sharing class noSharing { } Is it possible to use Lightning Data Services <force:recordData Without sharing \ field level ...
0
votes
1answer
301 views

How to hide field from standard page layout - using lightning

I have a custom object with two fields: 1) Start_Date__c - date 2) Start_Month_Year__c - Formula(Text) When the record is view (detail) I just want to show Start_Month_Year__c (formula field) and ...
1
vote
1answer
126 views

How to update the FLS using Salesforce Metadata API in a bulk update?

I have a set of fields in the array list which I wanted to give FLS with Read access. I'm using below piece of code to update the field level security using Salesforce API in java language. But the ...
3
votes
1answer
734 views

Visible vs Read Only?

Opportunity Fields > "Field Label/name" > Set Field-Level Security > What is Visible vs Read OnLy? A Google Search Revealed: Visible : If you check the "Visible" checkbox, that field will be ...
2
votes
2answers
199 views

How to make custom object record only visible to certain users based on field checkbox

So I have a custom object in my org called Promotion Events. I would like to add a field called 'Private' that is a check box, and if it is checked and the event is created, this event(Promotion Event ...
1
vote
2answers
34 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 ...
2
votes
1answer
102 views

How to deal with users without permission while using Lightning Data Services?

To be more specific, I have the following scenario that just happened: I developed a component on a sandbox (development environment). This component uses force:recordData to retrieve some field data ...
4
votes
1answer
104 views

How do I find out if a field is updateable by the System?

I am running a batch process that is marked without sharing. I would like to to take one course of action if the batch process can update a particular field, and another if not. For example: if (...
0
votes
1answer
103 views

Can we change FLS for required field?

I am aware of following: ProfileFieldLevelSecurity ProfileFieldLevelSecurity represents the field level security for users assigned to a profile. In API version 30.0 and later, permissions for ...
4
votes
1answer
170 views

Field Level Security for new fields

When creating new fields, some profiles are checked by default on page load. How are these profiles determined ?
0
votes
1answer
13 views

A user is able to see Sharing setting in setup without having “managed Sharing ”permission

A user is able to see Sharing setting in setup without having "managed Sharing permission" either through profile or Permission set,how can he have access ,Am i missing some configuration.
0
votes
2answers
605 views

How to hide a field from a specific profile?

I have a Pipeline object, in which I have a Members text box that I need to hide from Sales users. I have made the configuration as shown: However, when I login as a Sales user, I still see the ...
0
votes
1answer
413 views

Querying fields of a particular pagelayout w.r.t Profile and Object

Can we achieve SOQL for this below scenario If I provide Object Api Name Page Layout Name Profile Name It should return me list of available fields in the Page Layout, but not all fields present ...
0
votes
0answers
39 views

Hiding Custom Setting data on front-end and through postman

We are using angular for front-end and Salesforce is being used for maintaining database. REST APIs have been written on Salesforce to communicate and fetch data to front-end. A custom profile has ...
1
vote
1answer
121 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 ...
0
votes
1answer
34 views

Set field accessibility of Custom Setting's field

Can we set field level security / field accessibility of a Custom Setting's field?
1
vote
1answer
274 views

Add Field level security for person accounts field

Good day everyone, I am trying to add a field level security to first name, last name field for a person account. What I did is that I go to the user profile and I've tried to update the field level ...
0
votes
1answer
703 views

Show/hide standard component fields on Salesforce Communty based on Record Type of other field?

We would like to show/hide specific fields on our Salesforce Community based on the Record Type selected. The user will have the same security profile, so using FLS doesn't solve our problem. For ...
0
votes
3answers
112 views

Give a User access to two Fields on an Object

This seems like an easy thing that i'm absolutely pulling my hair out over. I have a couple of back office workers that need access to edit Opportunities (two fields only) - Ive set up a page layout ...
0
votes
1answer
27 views

Field-level editibility based on User field values

I only want users to be able to edit certain fields if they named in certain User lookup fields within the record. So the editability would be on a record-by-record basis. In other words, if the ...
1
vote
1answer
27 views

Is it possible to grant a profile to all the fields of one SObject?

We have created a new SObject with like 100 fields and create a new custom profile. When we deploy to production we can't deploy the new profile. So we have created one in prod and do the field ...
0
votes
0answers
82 views

Allow users to change Account owner (transfer record) but NOT edit Account Name?

We have a data model in which no changes can be made to fields on Accounts (Salesforce is not the system of record) but we would like users to be able to transfer ownership of accounts. So far we have ...
0
votes
1answer
198 views

Updating FLS using metadata API through java

I wanted to update FLS for the custom fields in Profile level. @datasert- Thanks for guided me on the right path, I have tried with the code below but after executed the code, changes are not ...
7
votes
1answer
1k views

Profile Field Level Security missing in XML when retrieve profile changes from scratch org

In our DX project we maintain 4 profiles (3 custom and the System Administrator profile). When a scratch org is created I can push the project and everything deploys correctly including the profiles ...
3
votes
2answers
3k 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 ...
0
votes
0answers
360 views

How to use MetadataService class using Metadata API through SOAP

I have a requirement to grant FLS to the certain fields on profile level. I want to achieve this using Salesforce Metadata API thru java. I came across the below code for updating FLS using ...
0
votes
1answer
71 views

How to grant FLS to an existing fields on profile basis through SOAP UI

How can I give field level security to the fields on profile basis I have referred sample on how to update the records but I'm not sure how this helps me on giving FLS to the fields. Because I need ...
1
vote
1answer
1k 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....