Skip to main content

Questions tagged [with-sharing]

Use the with sharing or without sharing keywords on a class to specify whether or not to enforce sharing rules.

0 votes
0 answers
46 views

We are developing a Salesforce managed package with multiple features sharing utility classes. Feature X: Can enforce with sharing and FLS safely. Feature Y: Accessed by guest users, cannot enforce ...
Sk_Dev's user avatar
  • 119
-1 votes
1 answer
338 views

I have recently started learning about apex security. I have one scenario where I'm not able to tell the exact outcome even after going through a lot of articles and youtube videos. Scenario: When '...
coder123's user avatar
  • 155
-1 votes
2 answers
762 views

Suppose I have an object with OWD set to private and I have given Read/Create Permission to a standard user now that user can only see his records (In apex class I haven't defined any mode).While this ...
Priyanshi Maheshwari's user avatar
-1 votes
1 answer
352 views

I want to check how two partner users with the same account are getting access to each other's partner record. Owd of user object - private No sharing rules on user object. Also, when i query ...
Anonymous 's user avatar
0 votes
1 answer
69 views

We have OWD for Account as Public Read Only, but there is a requirement that we need to make an account for Private. When we do that, the user will see only what they own and whatever they earn from ...
Basu's user avatar
  • 61
0 votes
1 answer
104 views

I am trying to validate the OWD for an object that is Public/Read Write without Read permission at the object level for a specific profile user. To validate the results I created a new profile by ...
indrasen neelam's user avatar
1 vote
1 answer
597 views

I am trying to update records which I don't have update access on. I am expecting to get errors for such records but it updating successfully. my org object owd is public read only and profile access ...
Parmanand Shete's user avatar
0 votes
1 answer
211 views

When I use 'Without Sharing' Keyword with class in a managed package and install it in a destination org or sandbox, the code works fine but get error in the checkmarx report. If I replace 'without' ...
socove's user avatar
  • 3
4 votes
0 answers
976 views

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
412 views

I have few question on "with Sharing" and "without Sharing" keyword in apex, In my Org the OWD for case is Public read only. I have one class where i am updating owner id of the ...
Nitish Yadav's user avatar
0 votes
1 answer
3k views

From the Salesforce security review point of view for the the app exchange app, we need to add the access checks while querying and doing DML operations. If we have a requirement that the SOQL/DML ...
Hemant Keni's user avatar
5 votes
1 answer
9k views

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....
user43598's user avatar
  • 537
2 votes
1 answer
669 views

Current Setup: I have an Aura controller which uses "with sharing" and a method deletes a lead using the Id. I set up a user with profile with no Delete access. I have also revoked "...
Fahad Khan's user avatar
0 votes
1 answer
157 views

Can anyone please explain if the class is declared as With Sharing then why do we still need to check if the User has permission for SOQL or not or the object creatable/editable etc? Please clarify. ...
user91530's user avatar
1 vote
2 answers
4k views

I have a patient object , related to Account (lookup relationship). Profile 'Standard User' doesn't have CRUD permissions on the patient object. In Account trigger, I call call 'accounthandler.cls' ...
Manish Anand's user avatar

15 30 50 per page