#SalesforceSpring23 – Secure Apex Code with User Mode Database Operations

#1MinuteTip #SalesforceSpring23 The new Database and Search methods support an accessLevel parameter that lets you run database and search operations in user mode instead of in the default system mode.

Apex code runs in system mode by default, which means that it runs with substantially elevated permissions over the user running the code. To enhance the security context of Apex, you can specify user mode access for database operations. Field-level security (FLS) and object permissions of the running user are respected in user mode and it always applies sharing rules. In system mode, the class sharing keywords control the sharing rules.

Product Area: Development -> Apex

User Mode Database Operation in Apex Code

References & Useful URLs

  • For Related Spring ’23 Release Note Article – Click Here

Want to Receive these Tips in your Inbox?

Finding it overwhelming to keep pace with Salesforce’s new release features? Try our “1 Day 1 Tip 1 Minute” emails, where you are going to get 1 tip every day that won’t take more than a minute to read. To find out more and subscribe please click here.

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top
Introducing All Access Pass