Soql Using Scope Clause

Use when writing or reviewing a SOQL query (in Apex, a selector, or via the API) that must return only a subset of records defined by ownership, team, territory, delegation, or an active scoping rule — through the optional USING SCOPE filterScope clause (mine, everything, team, delegated, my_territory, my_team_territory, mine_and_my_groups, scopingRule) placed after FROM and before WHERE. Also covers the mandatory USING SCOPE EVERYTHING requirement for the Scoping Rules SOQL operator. NOT for plain SELECT / WHERE / ORDER BY syntax — use apex/soql-fundamentals. NOT for WITH USER_MODE or CRUD/FLS enforcement — use apex/soql-security. NOT for the with sharing / without sharing choice — use apex/apex-with-without-sharing-decision. NOT the Metadata API ListView filterScope enum (different casing and value set), and NOT for authoring scoping rules beyond their SOQL-operator criteria.

PranavNagrecha 075d565 7 files · 43.0 KB Updated 15 repo stars

File contents

PranavNagrecha/AwesomeSalesforceSkills/tree/main/skills/apex/soql-using-scope-clause commit 075d5658d7

Frequently asked questions

npx skillmds add pranavnagrecha/soql-using-scope-clause