QuantumNest
SalesforceRelease

Summer '26: Apex starts asking who is running it

Most of Summer '26 is agent news. The part that will cost developers a sprint is a quiet change of defaults in Apex API version 67.0, and it arrives the day somebody bumps a version number.

QuantumNest Engineering19 May 20268 min read
A code editor on a dark screen showing a component file, with script imports at the top and list markup below
// the code does not change. the version number does, and so does whose access it runs with.

The Summer '26 release notes went up on 22 Apr, preview sandboxes began taking the upgrade around 9 May, and Salesforce's release announcement gives 15 Jun as the official release date. Salesforce Ben's release calendar lists the production weekends as 9 May, 5 Jun and 12 Jun, so look up your own instance on Salesforce Trust before you rely on anyone's summary.

Summer '26, the dates
  1. 22 Apr Release notes go up
  2. Around 9 May Preview sandboxes begin taking the upgrade
  3. 9 May First production weekend on Salesforce Ben's calendar
  4. 5 Jun Second production weekend
  5. 12 Jun Third production weekend
  6. 15 Jun Official release date in Salesforce's announcement

// weekends per salesforce ben's release calendar. your own instance's date is on salesforce trust.

The headline material, as usual, is agents. Salesforce's top ten opens with Multi-Agent Orchestration and puts Tableau MCP third, and we will get to both. The change that will cost real engineering time sits elsewhere, in the Apex Developer Guide rather than on a keynote slide. From API version 67.0, Apex stops assuming it may see everything. This is the third post in our release series, after the Winter '26 and Spring '26 previews.

Quick poll

Where does most of your org's Apex sit today?

Your answer stays on this page. We do not count or store it.

01 / THE CHANGEFour defaults flip at version 67.0

Salesforce Ben's developer roundup, published the day after the notes, reports that Apex written against API version 67 picks up new security behavior. Salesforce Dictionary's developer summary calls it "The single most consequential default change in years", which is a bold line for a release that also ships agents. We agree with it.

The direction is right. Salesforce has told developers to respect the running user's access for a decade, and a default that quietly ignored it was never going to last. What makes this one awkward is that nothing in the code changes. The same query, in the same class, returns different results depending on a number in a metadata file.

What the same Apex does, by version
  • Class on API 66.0 Queries and DML: system mode
    No sharing keyword: without sharing
    WITH SECURITY_ENFORCED: supported
  • Class on API 67.0 Queries and DML: user mode
    No sharing keyword: with sharing
    WITH SECURITY_ENFORCED: deprecated
  • Trigger, any version Queries and DML: system mode
    Applies to: every version
    Version bump needed: no

// same query, three behaviors. the api version in the metadata file picks one.

02 / WHAT BREAKSWhere this bites

Apart from triggers, a class that stays on its current version keeps its current behavior. The damage arrives later, on the day somebody bumps a class to 67.0 to use a new feature, and the change passes review because the diff is one line long.

Expect two kinds of failure. The loud kind is a permissions error: a query reads a field the user cannot see, or a DML statement writes to an object the user cannot edit, and the transaction stops. Salesforce Dictionary expects INSUFFICIENT_ACCESS errors from shared utility classes that leaned on system mode. Those are irritating, and they are also the easy ones, because a user reports them within the hour.

The quiet kind is worse. Record access now applies too, so a query that used to see every matching row returns only the rows this user can see. No error, no log line. A rollup comes out short, a duplicate check misses the duplicate, a scheduled job processes fewer records and reports success. We would look for this first in reporting and reconciliation code, because that code was usually written by someone who assumed they could see the whole table.

Two ways a 67.0 bump fails
  • Loud: a permissions error A query reads a field the user cannot see, or DML writes to an object they cannot edit, and the transaction stops. A user reports it within the hour.
  • Quiet: fewer rows Record access now applies, so the query returns only the rows this user can see. No error, no log line. A rollup comes out short and a scheduled job still reports success.

// look for the quiet kind first in reporting and reconciliation code.

The usual suspects

Pop quiz

After Summer '26, which of these runs in system mode on every API version?

03 / PREPAREGetting ready without a big-bang rewrite

The good news is that you decide when this happens, one class at a time. Use that. The order we would follow:

  1. Inventory versions. Pull the API version of every Apex class and trigger, oldest first. In most orgs the spread is wide, and the oldest classes are the ones nobody wants to touch.
  2. Write the sharing keyword on every class. Pick with sharing, without sharing or inherited sharing on purpose. Once every class states its intent, the second default in the list stops mattering.
  3. Find every WITH SECURITY_ENFORCED. A text search across the repository is enough. Replace each one with WITH USER_MODE, or WITH SYSTEM_MODE where the query really must see everything, and leave a comment saying why.
  4. Choose user or system mode per operation, in the code. Salesforce Ben reads the change as a push toward stating user mode or system mode explicitly in your queries. That is the habit worth building, because a stated choice survives the next default change.
  5. Test as a real user. Wrap the important test methods in System.runAs with a user on your most restricted profile. If your suite has never done this, it will find things before version 67.0 does.
  6. Bump in the preview sandbox, one class at a time. Run the full suite after each bump, then have a few real users click through the affected pages before the change moves on.
Field note

Do not run a find-and-replace from WITH SECURITY_ENFORCED to WITH USER_MODE and call it done. User mode applies record access as well as field and object permissions, so the replacement can also change how many rows come back. Review each one as a behavior change, because that is what it is.

Self check

How ready is your code for API 67.0? Tick what is true today.

04 / THE RESTEverything else in the box

The short version of the rest, from Salesforce's announcement and the two developer summaries linked above.

Our read on four of the rest
Multi-Agent Orchestration and Tableau MCP Pilot both, no reorganization yet
Elastic async limits Helpful on a heavy batch night, still design for limits
Dev channel on one sandbox Never your main test environment
Salesforce Functions No longer sold or renewed

05 / CALENDARRetirements for the calendar

Every release also carries slow deadlines, and Summer '26 adds a few. From Salesforce Dictionary's summary of the notes:

Retirements, release by release
  1. Summer '26 The Salesforce-managed X authentication provider retires
  2. Winter '27 OAuth 2.0 username-password flow for connected apps retires
  3. Spring '27 Salesforce to Salesforce is scheduled for retirement
  4. Summer '27 SOAP API login() for API versions 31.0 to 64.0 is scheduled to retire
  5. Summer '27 A release update that stops managed packages running anonymous Apex with a session ID from UserInfo.getSessionId() is scheduled to enforce

// source: salesforce dictionary's summary of the summer '26 notes.

The username-password item has the shortest fuse. Winter '27 is the next release, and the middleware that logs in with a password is usually the one nobody documented.

06 / THIS WEEKWhat we would do this week

  1. Confirm your production date on Salesforce Trust, and check that the sandbox you test in is on a preview instance.
  2. Export the API version of every class and trigger, sorted oldest first.
  3. Search the repository for WITH SECURITY_ENFORCED and for classes with no sharing keyword. Two lists, each with a named owner.
  4. Pick three busy classes, bump them to 67.0 in the preview sandbox, and run their tests as a restricted user.
  5. List every integration that logs in with a username and password. That list is due before Winter '27.

Summer '26 puts agents in the keynote. Expect Apex to own the retrospectives. The version bump is a one-line diff. Review it as if it were a hundred.

Planning the move to 67.0?

We review Apex codebases ahead of each release and tell you which classes are safe to bump and which need work first.

Book a release review