I have a very simple query on Tasks that get Tasks created by a user. If I run the query in the Dev Console I get 4 rows (as admin). The same query in an apex method (as the user/owner), I get 1 row only.
So far I've tried: - Checking the permission set for the user, to ensure it has all access to the Task object - Added the ALL ROWS to the Apex query - This is on a dev org with default settings
Select Id,
ActivityDate,
Priority,
OwnerId,
Status,
Subject,
Description,
whatid
from Task
where CreatedById in (select id from user where name='Linda Charles')
and IsClosed=false
Why might the queries have different results?
CreatedBy.Name = '...'
?