USING SCOPE clause for SOQL

The new USING SCOPE clause for SOQL queries lets you limit results by filterScope.

Syntax:

SELECT column_name FROM table_name USING SCOPE filterScope_value

filterScope_value can take one of the following enumeration values: Everything, Mine, Queue, Delegated, MyTerritory, MyTeamTerritory or Team.

Example:

SELECT Name FROM Account USING SCOPE Everything

With USING SCOPE:

Without USING SCOPE:

Leave a Reply