Secure Apex Code with User Mode Database Operations (Pilot)
Where: This change applies to Lightning Experience and Salesforce Classic in Enterprise, Performance, Unlimited, and Developer editions.
Why: By default Apex code executes in system mode and doesn’t respect running user permissions. To enhance the security context of Apex, you can specify user-mode access for database operations by invoking Apex in user mode. The field-level security (FLS), sharing rules, and CRUD permissions of the running user are respected in user mode, unlike in system mode.
How: If you're interested in participating in the pilot program, ask your Salesforce Account Executive.
- Database.query methods
- Search.query methods
- Database DML methods (insert, update, upsert, merge, delete, undelete, convertLead)