Skip to main content
New
Stack Overflow Jobs powered by Indeed: A job site that puts thousands of tech jobs at your fingertips (U.S. only). Search jobs

Questions tagged [fls]

FLS - Field level security

Filter by
Sorted by
Tagged with
0 votes
0 answers
23 views

SFDX Scanner DFA: [READ] operation with field(s) [Unknown]

I'm getting this error warning:Unknown field on SOQL. packages/lesson/main/default/classes/EligibleSubjectHandler.cls:3 packages/lesson/main/default/classes/EligibleSubjectHandler.cls:30 ...
vctqs1's user avatar
  • 85
3 votes
3 answers
82 views

ApexCRUDViolation: check for object-level delete permission does not work

I am trying to check for object-level delete permission on a custom object before performing a DML delete operation on it. The check is performed as it is shown in documentation here. Here is the ...
Mariia Illarionova's user avatar
1 vote
1 answer
50 views

FLS Create and Update Vulnerability [closed]

if (rec.Agreeto != null) { if ( Schema.sObjectType.Success_Collaboration_Info__c.fields.Agree_Collaborate_with_Success_Run__c.isUpdateable() ) { phyCollab....
Surya Happytech's user avatar
-2 votes
1 answer
21 views

Database.update issue with AccessLevel (FLS check) and Master-Detail fields with reparenting disabled

I'm having an issue with using AccessLevel.User_mode: Database.update(someSObject, AccessLevel.User_mode); The problem is that if I have a Master-detail field on an object that is being updated and ...
LinQ's user avatar
  • 139
0 votes
1 answer
63 views

Modifying Field Level Security throws an error

When trying to change the Field Level Security of a specific field, I am getting the following error: Error - Unable to Access Page You are missing information needed by the page you have attempted ...
Ishank's user avatar
  • 109
0 votes
1 answer
38 views

CRUD/FLS in Apex Triggers

We are preparing a 2GP for security review and one of the common issues is CRUD/FLS. Our package notifies our server when opportunities or accounts change using triggers (webhook functionality). For ...
tubbytoad42's user avatar
0 votes
1 answer
95 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 ...
lhh13's user avatar
  • 41
0 votes
0 answers
66 views

Platform event - not accessible through LMA

On one of the org. I got the below error from the Platform event Access to entity 'Log__e' denied: Entity is not api accessible common.exception.ApiException: Access to entity 'Log__e' denied' This ...
Saurabh's user avatar
  • 27
0 votes
0 answers
101 views

Check whether generic SObject is updateable

How do I check whether a generic SObject is updateable before DML operation. For standard and custom objects I know the general pattern is: Schema.sObjectType.Account.isUpdateable() However if I have ...
lhh13's user avatar
  • 41
1 vote
1 answer
284 views

Do I need to enforce security rules for SOQL in test methods?

I'm currently in the process of updating a managed package for security review. I've been adding the "WITH SECURITY_ENFORCED" statement to SOQL requests, however I've struggled to find any ...
lhh13's user avatar
  • 41
-1 votes
1 answer
30 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 ...
confusedstudent's user avatar
0 votes
1 answer
93 views

Is there a way to do Case Manual Sharing but for specific field FLS access to specific user?

As we all should know, the OOTB Salesforce way of doing manual sharing is give a user (who is typically not belonging to the same recordType) access to VIEW the record. As in below screenshot : ...
compski's user avatar
  • 1,352
3 votes
1 answer
743 views

Query: FLS Create issue while running checkmarx

I am running multiple classes and have some Query: FLS Create issues while running the checkmarx. I am really not knowing what they mean by this. I feel there is something simple but I cannot discern ...
Rahul Allada's user avatar
0 votes
1 answer
588 views

Platform Integration User Access to Manage Package

I developed and published free app in the AppExchagne. It does check the security access to fields/object as best practice. In subscriber org there is process running by user "Platform ...
Liron C's user avatar
  • 1,778
4 votes
0 answers
696 views

With Sharing appears to be enforcing object level security and field level security

We ran into a strange issue today. We have an Apex trigger that is calling an Apex service class. The service class was using with sharing and in our testing, users were able to create records even ...
Swisher Sweet's user avatar
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 ...
Fgh999's user avatar
  • 35
0 votes
0 answers
2k views

Can't assign Permission Set License Assignments to a User

I have a User who had a specific FSL Permission Set License assigned. For testing, I deleted this FSL Permission Set License in User edit page and now, I want to revert changes and re-assign the ...
CPS's user avatar
  • 345
-1 votes
1 answer
445 views

FLS metadata for a custom field

Where can I find the FLS metadata for a field? In which component metadata I can find the FLS for a field given to profiles?
Ali's user avatar
  • 1
3 votes
1 answer
200 views

FLS in SOQL - VisualForce vs LWC

I have a VF page and an LWC, both the UI are displaying a datatable of records Project__c. User A (Standard user) doesn't have access to Report__c and Geographic__c field on Project__c. The VF page ...
d_k's user avatar
  • 1,291
0 votes
2 answers
459 views

CRUD/FLS checks on fields of a lookup

We have a Salesforce public site where we expose name fields of Account and Contact object. These fields are queried through a lookup of Account and Contact on a custom object. Like this: [Select Id, ...
Mr.Frodo's user avatar
  • 5,802
0 votes
1 answer
369 views

Change data capture and FLS

As per documentation, it is mentioned : Change Data Capture(CDC) respects your org’s field-level security settings. Delivered events contain only the fields that a subscribed user is allowed to view. ...
sfdc_Qrius's user avatar
12 votes
0 answers
474 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 ...
Keith C's user avatar
  • 136k
3 votes
1 answer
1k views

2GP Create Package Version Fails when running tests

I've recently added some Field Level Security checks into the Apex code of a 2GP managed package. But when I run: sfdx force:package:version:create ... A lot of the tests fail, saying the fields are ...
Robs's user avatar
  • 9,356
1 vote
1 answer
135 views

Force.com Source Scanner Results: FLS Update and Create

I've run the Force.com Source Scanner against my Managed Package and here are the summary results: There are two areas FLS Update and FLS Create where I got 28, and 37 risks respectively... I am ...
Robs's user avatar
  • 9,356
6 votes
1 answer
566 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, ...
Jason Clark's user avatar
  • 11.9k
0 votes
1 answer
520 views

Why there are no entries in FieldPermissions table if a field is marked as Required in Setup?

I use query like below to find what Profiles and Permission Sets give what kind of permissions to a specific field: SELECT Parent.ProfileId, Parent.IsOwnedByProfile, ParentId, Parent.Label, Parent....
javanoob's user avatar
  • 8,887
1 vote
0 answers
178 views

Managed Package Platform Event and DML by unlicensed user

I am working on a managed package which will be licensed per user. The package will include two features: Feature A: Global Apex Class that publishes platform events (also packaged). Trigger on this ...
ondrakr's user avatar
  • 350
-2 votes
1 answer
477 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;
Sonu Sagar's user avatar
0 votes
1 answer
822 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 - ...
Saariko's user avatar
  • 5,610
3 votes
1 answer
277 views

FLS check in 2GP

I've created a new 2GP package. Since it is going to be released to AppExchange, I've implemented a generic CRUD and FLS check for every place I contact with the Database in my Apex code. e.g. ...
Oleksii Fisher's user avatar
0 votes
0 answers
18 views

Need to create a specific workOrder when Maintaince Plan is created

I need help with some stuff, I need to create suppose 5 workOrder when the Maintain Plan is created via APEX ? When i access it's field's via apex it give me error. I have the Field Level Access (...
Malik's user avatar
  • 31
0 votes
0 answers
75 views

Cometd does not receive messages on a Filtered Pushtopic for custom profile

I have a lightning cometd. When I use pushtopic without filter for a custom profile it works. When I add filter, it does not receive the messages. If I login as system admin, the filtered pushtopic ...
Raja Vivekanandhan's user avatar
0 votes
1 answer
4k views

CheckMarx FLS Create/Update Vulnerability in Salesforce Apex Code [duplicate]

I need help in fixing below vulnerabilities found in CheckMarx scan. Scenario: I have written a trigger on FeedItem object. This trigger will archive the FeedItem into custom object ...
Anil Kumar's user avatar
-1 votes
1 answer
646 views

Apex FLS Methods

I have a question regarding Salesforce FLS. Is there any method available which dynamic check the object field-level security. Like I have Account object and Field name Phone and pass to any ...
Faisal's user avatar
  • 837
0 votes
0 answers
240 views

Confused creating FLS for Update

I'm creating an AppExchange App which has an Update operation to be performed. When put through the checkmarx I get the below error. Method saveMappingAssignment at line 65 of classes\...
user3872094's user avatar
0 votes
1 answer
802 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 ...
SlavaHq's user avatar
0 votes
1 answer
372 views

Profile is being used in community by salesforce?

I am able to see two profile related to site and user. Which profile is used by salesforce to provide Field level access of a object? First one is : (Open Contact having user -> View User -> ...
Kritik's user avatar
  • 266
3 votes
1 answer
2k views

Does lightning-input-field automatically respect field level security (FLS) from profile/permission sets?

A strength of Visualforce's apex:inputField is that it automatically respects the view/edit permissions that come from the profile/permission sets for both the object and the fields. I'm assuming ...
Keith C's user avatar
  • 136k
3 votes
1 answer
248 views

Which user applies to the execution context when executing messaging.sendEmail?

I have a field that is used in an email template for which no FLS is granted in any profiles. The Apex code that sends the email using messaging.sendEmail() is invoked from a trigger so I assume it ...
RobD's user avatar
  • 404
1 vote
2 answers
504 views

Updating a FieldPermission record produces a INVALID_OR_NULL_FOR_RESTRICTED_PICKLIST error

I am attempting to update FLS using FieldPermission records for profiles and permission sets. This is working fine for unmanaged fields, but for managed fields I am getting an error saying that the ...
Austin Turner's user avatar
1 vote
1 answer
277 views

How to Stop FLS Defaulting to Read/Write Enabled via Metadata API without Specifying fieldPermissions in Profile

I'd like to define FLS in permission sets alone and not have to maintain FLS per field in profiles. I've been surprised to find that if I do not specify in my profile that the FLS defaults to Read/...
RedQueries's user avatar
9 votes
2 answers
12k views

Get all field level permission from SOQL for an permission set

What I want to do: I am trying to create a tool in Java, which query permission sets from Salesforce Org using REST(As we do in workbench). After getting all the permission sets which field ...
वरुण's user avatar
1 vote
1 answer
204 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 ...
user75568's user avatar
3 votes
1 answer
8k views

Disable Lightning Combobox in LWC based on FLS

I know there is a way to check if the object/field is updateable, then only it will allow the user to read or update the field like below apex : if(!Schema.SObjectType.Account.fields.Type....
compski's user avatar
  • 1,352
4 votes
0 answers
714 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 ...
VarunC's user avatar
  • 5,950
-1 votes
1 answer
327 views

CRUD/FLS checks on Dynamic SOQL - Needed for WHERE clause? [duplicate]

For the AppExchange Security Review, do we need to check FLS on a Dynamic SOQL WHERE clause as well? Ex: If Contact.My_Custom_Field__c is not visible to the logged in user, then the following SOQL ...
Brian Miller's user avatar
  • 5,222
14 votes
4 answers
3k views

How to best enforce CRUD/FLS and pass Security Review

Since Salesforce began to require CRUD / FLS checks as part of the Security Review for AppEchange apps in 2015 there has been a lot of discussions why this cannot be done by the platform and how this ...
Robert Sösemann's user avatar
5 votes
2 answers
2k views

How to test CRUD and FLS in unit tests?

BACKGROUND I am working on a managed package and it contains a custom object (X__c) with one custom field (X__c.Fld__c). In the controller I check if a user has Read access to both the object and ...
Eduard's user avatar
  • 5,149
2 votes
0 answers
71 views

Did Salesforce remove FLS visibility for HasOptedOutOfEmail and HasOptedOutOfFax during a release update automatically?

I'm pretty sure my code was querying these some time ago inside a dynamic SOQL query. Today I can't query them anymore because FLS seems to be removed from the Admin profile that I'm using. Easy ...
Uwe Heim's user avatar
  • 28.4k
4 votes
1 answer
469 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 ...
Bryce's user avatar
  • 442