#SalesforceSummer26 [Tip 26] - Apex Now Runs Database Operations in User Mode by Default

Before Summer ‘26 release, Apex ran in system mode by default — meaning it ignored the running user's sharing rules, field-level security, and object permissions, and could read or change any record. Handy, but risky: forget to lock it down, and your code could quietly expose data the user was never meant to see.

Summer '26 flips the default. On API version 67.0 and later, Apex database operations — SOQL and SOSL queries, DML statements, and Database methods — now run in user mode by default.

In user mode, your code respects the current user's sharing rules, field-level security, and object permissions, the same way the UI does. Salesforce calls this "secure by default": you now opt into system mode on purpose, instead of getting it by accident.

Product Area: Apex

One more thing: the old WITH SECURITY_ENFORCED clause is removed as of API 67.0 — use WITH USER_MODE instead.

Account acc = [SELECT Id, Name FROM Account WITH USER_MODE LIMIT 1];

The flip side: if you bump an existing class to API 67.0 and it was quietly relying on system mode, queries that used to return everything might suddenly return less, or throw an error on fields the user can't see.

So when you raise the API version, check where your code actually needs system mode and set it explicitly. Being intentional about access mode is the whole point of the change.

References & Useful URLs

  • For Related Summer '26 Release Note Article – Click Here