Quick tip: the USING SCOPE delegated modifier in SOQL returns records that were delegated to another user — handy when auditing tasks and events that changed assignee.
What is USING SCOPE delegated?
Salesforce’s SOQL supports the USING SCOPE clause to filter records by special scopes. One of these scopes is delegated, which returns records that have been delegated — for example, tasks or events that were assigned to a different user after an initial assignment.
Why this matters
Delegation is common in sales and support organizations where owners temporarily assign tasks or events to colleagues. Using USING SCOPE delegated helps admins and developers quickly find records that were reassigned, useful for audits, reports, process troubleshooting, or automation that must consider reassigned items.
Examples
Simple queries that return delegated tasks or events:
Select Id FROM Task USING SCOPE delegated
Select Id FROM Event USING SCOPE delegated
Note: these queries return data in the context of the previous user (the original owner) — keep this in mind when using them in automation or Apex.
Best practices & use cases
- Use for auditing reassigned activities during a given period.
- Combine with additional WHERE clauses (e.g., date ranges, related records) to narrow the result set.
- When used in Apex or integrations, confirm the running user/context to avoid unexpected visibility differences.
If you need to include delegated records in reports or flows, consider how sharing and running-user context will affect the returned results.
Why this matters for Salesforce admins, developers, and business users: understanding special SOQL scopes like delegated gives you a precise, efficient way to identify reassigned activities — improving audits, troubleshooting, and targeted automations.








Leave a Reply