Skip to content

QRY_Builder.Scope

Class

apex
global enum QRY_Builder.Scope

Enumeration of valid SOQL scope values for use with the USING SCOPE clause.

Since: 1.0

Example:

apex
List<Account> myAccounts = QRY_Builder.selectFrom(Account.SObjectType)
    .usingScope(QRY_Builder.Scope.MINE)
    .toList();

Values

ValueDescription
global DELEGATEDRecords delegated to another user.
global EVERYTHINGAll records the user has access to.
global MINERecords owned by the current user.
global MY_TEAM_TERRITORYRecords in the current user's team territory.
global MY_TERRITORYRecords in the current user's territory.
global TEAMRecords owned by the current user's team.

Value Details

DELEGATED

apex
global DELEGATED

Records delegated to another user.

EVERYTHING

apex
global EVERYTHING

All records the user has access to.

MINE

apex
global MINE

Records owned by the current user.

MY_TEAM_TERRITORY

apex
global MY_TEAM_TERRITORY

Records in the current user's team territory.

MY_TERRITORY

apex
global MY_TERRITORY

Records in the current user's territory.

TEAM

apex
global TEAM

Records owned by the current user's team.