New answers tagged


Currently salesforce do not have an option to query sharing rules which are declared through sharing settings based on object level.


As manjit5190 pointed out in the comments, profiles don't control what records people see; they control what kinds of records they can see. For example, say a business has two profiles that can see opportunities -- Sales and Support. Sales needs access to opportunities so that they can generate new revenue, and support needs access to submit replacement ...


If you want this unit test user with the Standard User profile to have full read/write capabilities, I'd suggest creating a PermissionSet, adding object permissions to that Permission Set via ObjectPermissions, then assign it to this unit test user via PermissionSetAssignment. All of these are standard objects of which you can use regular DML commands to ...


Depending on your use case, you can probably just turn off CRUD permission for Accounts. Apex can run in "system mode", where it ignores normal security (field, object, and record security). Simply specify "without sharing" in your class' definition (e.g. public without sharing class CsvBatch implements Database.Batchable<String>). You can still choose ...


Just a quick update. This seems to be related to a known Salesforce issue and which has since been fixed. See

Top 50 recent answers are included