Skip to content

The Soql.Scope Enum

Jason Siders edited this page Jul 4, 2025 · 5 revisions

Enumerates possible values to be used with the optional USING SCOPE SOQL clause.

Use this in conjunction with the setScope builder method:

Soql query = DatabaseLayer.Soql.newQuery(User.SObjectType)
  ?.setScope(Soql.Scope.EVERYTHING)
  ?.toSoql();

Values

  • DELEGATED
  • EVERYTHING
  • MINE
  • MINE_AND_MY_GROUPS
  • MY_TERRITORY
  • MY_TEAM_TERRITORY
  • TEAM

apex-database-layer

Home

Core Concepts

Reference Guide

Migration Gudes

Clone this wiki locally