Skip to main content

Questions tagged [crud]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
123 views

sObject type 'OrderItem' is not supported in Flow Get Records on OrderItem

Whilst migrating profile-based permissions to minimum access - salesforce + permissions + permission set groups, the running user started a screen Flow and got this error: sObject type 'OrderItem' is ...
cropredy's user avatar
  • 72k
0 votes
1 answer
259 views

Contract records access

Here is the sharing settings for account/contract: Our experience users (community) have to access (read/write) the contract records under the account their contact is linked to but only those ones. ...
Fabien Braconnier's user avatar
0 votes
1 answer
107 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
1 vote
1 answer
311 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
0 votes
1 answer
143 views

FFLIB Framework Can The Context Be Set To Run As a Specific User?

On an implementation I'm currently working on we have the FFLIB Framework in place. I noted for a requirement to delete specific records that the Framework is enforing triggers to run in context of ...
RedQueries's user avatar
-2 votes
1 answer
120 views

The Error in this code is - validate CRUD permission before SOQL/DML operation (rule: secuirity - apexCRUDVioloation) what is the probable solution?

public with sharing class VehicleController { @AuraEnabled(Cacheable=true) public static List<Vehicle__c> getVehicleList() { return [SELECT Id, Veichle_Name__c, Rental_Rate__c, ...
SOMANKAR CHAKRABORTY's user avatar
0 votes
0 answers
465 views

Is there an event log that captures record creation / updates?

I am trying to find an event log that captures whether a CRUD (create, read, update, delete) event has happened on any record. I was thinking there would be one under ApexExecution event type with a ...
S.B.'s user avatar
  • 2,091
0 votes
0 answers
132 views

Enforce CRUD on single record DML statement

As the title suggests I am trying to enforce CRUD on a DML statement for a single record. I see the stripInaccessible() method takes in a list of sObjects. Is there an equivalent method for a single ...
Rory's user avatar
  • 429
1 vote
1 answer
392 views

Operating between two parents of a junction object

I have say object A, B and C with A and C as parent object and B as a junction object. What I want is- whenever a B is created between A and C, a field named field__c on A should be transferred to C ...
Ashutosh Srivastava's user avatar
0 votes
1 answer
321 views

Delete access based on checkbox value

I have a requirement where I would like to disable Delete permission on records for Profile ABC based on a checkbox in the record. Is there any possibility of achieving this requirement without using ...
Sai Vineeth Maddula's user avatar
0 votes
2 answers
468 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
1 vote
0 answers
297 views

Issue creating Financial Account for Site guest User

Unable to Create Financial Account using Site Guest, User even after assign permission set provide by FSC , Below are the permission sets Financial Services Cloud Extension Financial Services Cloud ...
NITHESH K's user avatar
  • 2,535
0 votes
1 answer
1k views

INSUFFICIENT_ACCESS_OR_READONLY Error on Order Items deletion, even though I am System Administrator

Even though I have a System Administrator profile assigned to me, and have the CRUD permissions on the Order Line Item Object, I am receiving the below error when I try to delete the Order Item ...
Akshay Vasu's user avatar
0 votes
1 answer
2k views

Doing CRUD operations in LWC vs doing CRUD operations in Apex?

I have a LWC button that when clicked calls the controller class which calls another class which does a callout and depending on the response modifies the records accordingly. After doing the callout, ...
nSv23's user avatar
  • 554
0 votes
2 answers
3k views

User doesn't have permission to delete a case

I have two permission sets: firstOne: contains only "Manage Cases" permission and Modify All on Cases secondOne: contains all the first one but also has a lot of other settings related or ...
Ivan Kh's user avatar
  • 41
0 votes
1 answer
1k views

Why does the FFLIB framework enforce CRUD security and sharing rules by default for Domains?

In FFLIB, a Domain enforces CRUD security and sharing rules by default. We use FFLIB Domains for implementing triggers. In the Salesforce standard, triggers run in system context, meaning they don't ...
Daniel Wutz's user avatar
0 votes
1 answer
403 views

Can I give CRUD permissions to custom object in Customer community

I have salesforce Org which is using an app from the app-exchange, the objects in the app cant be given acces trough a Customer community. Is it possible to create a custom object i.e. ...
Thomas's user avatar
  • 2,310
0 votes
2 answers
2k views

Getting the following error INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY for a site guest user

So I know similar questions has been asked before, but I couldn't find a solution using the following links: Link1, Link2, Link3 (and more) The situation is as follows. So I have a form (a visualforce ...
fooiey's user avatar
  • 103
0 votes
1 answer
811 views

Usage of salesforce bulk api for integration with java using rest

I am new to salesforce, hence this long post. I wanted to create a java app to do CRUD on salesforce. I have followed the rest api tutorial, and created app for fetching data from salesforce using ...
NiharGht's user avatar
1 vote
1 answer
877 views

How to remove Salesforce CRUD Delete Security Risk?

When I scanned my app yesterday, and it raised a bunch of CRUD Delete security issue. So, I added isDeletable() check to all the delete query, and scanned it again. Still, it showed the same security ...
Jayesh Babu's user avatar
0 votes
1 answer
1k 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. ...
SFDC_Beginner'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
0 votes
1 answer
232 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> ...
pincet's user avatar
  • 923
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 ...
David-IT's user avatar
  • 135
0 votes
0 answers
218 views

Deleting a record from Event object

I have an app that is used to delete an event using the event ID, and it seems to be working, however I noticed after deleting the event, there are still records in EventRelation where the EventId is ...
rosghub's user avatar
1 vote
1 answer
2k views

Allow user to insert File/ContentVersion when not Admin

I want to insert ContentVersion as a non-Admin Profile/User. When I run the code below I get the error below. I tried to clone the System Administrator profile and call it nonAdmin, that did not work....
Tredecies's user avatar
1 vote
1 answer
242 views

CRUD enforcement does not allow access despite user privilegies

I've a custom object accessible for a custom profile cloned from Salesforce/ Standard user profile. The custom object was created using a System administrator user profile. I've granted access to this ...
Bryce's user avatar
  • 442
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
0 votes
0 answers
135 views

Can Code triggered by Chatter-Free user run in System mode?

I am exposing some code to Chatter Free user which modifies Account objects. I know that Chatter Free users are not directly able to modify them. But can my trigger code do it on behalf of them? As ...
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
4 votes
1 answer
479 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
0 votes
1 answer
242 views

How to populate an object with JSON data from a remote server?

I'm new to SF development, my client(who owns the SF account I'm working on) created an object and he wants the JSON objects that I will be sending from a different server through a POST method to be ...
Yuran Pereira's user avatar
0 votes
1 answer
659 views

ApexCRUDviolation Fix

How to fix ApexCRUDViolation for inner query. Below is the query. proposal = [select Id, Name,(Select Id From PQConfig__Configurations__r) From Proposal__Proposal__c Where Proposal__Opportunity__c =:...
diwakar g's user avatar
1 vote
0 answers
43 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 ...
jvrdelafuente's user avatar
4 votes
2 answers
18k views

soql on object permissions on a profile

I was trying to find out CRUD level permissions for a particular object on a specific profile for which I've framed below query: SELECT Id,SObjectType,PermissionsRead,PermissionsCreate FROM ...
Sagnik's user avatar
  • 615
4 votes
1 answer
5k views

How to check other user's CRUD permission for an object (APEX)

I want to find out, if another user has READ permission on a specific object (I don't care about record access/sharing). Is there a way to accomplish this via APEX? I do NOT want to find out if the ...
Christoph's user avatar
  • 1,022
1 vote
1 answer
92 views

SysAdmin Cannot delete EventRelation in Unit Test?

I have a unit test that creates an Event (in the future) and some EventRelations (for Contacts, with isInvitee=True), and then later deletes 1 of the EventRelations, via runAs(SysAdmin). Pretty sure ...
Jason Clark's user avatar
  • 11.9k
4 votes
1 answer
206 views

How to enforce CRUD and FLS in bulk trigger?

How to enforce CRUD and FLS in following situation (bulk trigger). Better idea is simply throw an exception or addError(errMsg) ? trigger CaseCommentTrigger on CaseComment (after insert) { List<...
Grzegorz Połuch's user avatar
0 votes
2 answers
426 views

Will Sharing=ReadOnly allow my user to Delete or Clone a record

I have Lightning Quickactions for Delete and Clone on a CustomObject__c and I want to ensure that only users with the right permission can use it. From reading this documentation I understand that I ...
Robert Sösemann's user avatar
0 votes
1 answer
583 views

CRUD FLS issue to edit task access for site guest user

I am applying CRUD FLS on task object fields and also I have provided read and edit access to task for site user profile. Even checked with sharing settings as 'Controlled by parent'. But still when ...
Vinod Kambire's user avatar
1 vote
1 answer
770 views

FLS and CRUD check for User object

I have a code which is inserting user object. It is created when the end user creates his account from force.com site. Since we cannot control FLS for user fields at profile level do we have to check ...
AJoshi's user avatar
  • 33
1 vote
1 answer
752 views

check FLS and CRUD for more than one field

I have a code which inserts custom Note__c object by using 5 fields. I want to check FLS and CRUD permission field level wise as they are reported in the checkmarx report. I know we can write in if ...
AJoshi's user avatar
  • 33
1 vote
0 answers
427 views

How can the Describe for a Field of getPopulatedFieldsAsMap() be null

I'm doing a CRUD check on Field level, since under some weird circumstances our customers don't have update rights on Record level, but only on fields (it's a guest license). So in addition to the ...
itsmebasti's user avatar
  • 6,467
1 vote
1 answer
96 views

Custom Setting for User Create Access Remove

In my org 4 users have the same profile and have all CRUD permission. My requirement is: I don't want to give create access to only one user with the help of custom setting, but I am not aware about ...
Mahesh Gupta's user avatar
5 votes
1 answer
314 views

CRUD & FLS on Managed Package Objects

We're working on a managed package that includes two data SObjects which track and log the work the users do in our package. We are including an Admin permission set and a User permission set to ...
Charles T's user avatar
  • 11k
0 votes
2 answers
3k views

system.security.NoAccessException even if controller APEX class is of type without sharing

I have a visual force page with standard controller (of type standard object) and controller extension. controller extension for page is of type without sharing. On this page, I am binding fields ...
sfdcnoob's user avatar
  • 101
0 votes
0 answers
27 views

Contact Update from Authenticated Site User

I have an existing Apex class that serves as a controller in a force.com site visualforce page. The Apex class is performing an update on the Contact sObject directly and I believe the update should ...
rStrunk's user avatar
  • 67
2 votes
1 answer
166 views

AppExchange ISV Security Review CRUD/FLS Puzzler

Who knows the answer to this puzzler? Q: If a Visualforce Page is using a standard controller with a custom controller extension and the controller extension is declared "with sharing", do we need ...
Philip F's user avatar
  • 343
2 votes
1 answer
1k views

isAccessible() vs isQueryable() and which one to use for SOQL query CRUD checks [duplicate]

Whats the difference between isAccessible() vs isQueryable() methods in DescribeSObjectResult Class and which method should one use for CRUD checks in SOQL query ? (https://developer.salesforce.com/...
eddywebs's user avatar
2 votes
1 answer
2k views

CRUD/FLS Enforcement: how to add isAccessible() to the test class for code coverage

I received the result from security review from Salesforce team and it failed. One of the vulnerability shown in the report was CRUD/FLS Enforcement. The report suggest I use the isAccessible() check ...
nmess88's user avatar
  • 163