You need to sign in to do that
Don't have an account?

without sharing declaration
Hi,
public without sharing class ClosedTaskListController { @AuraEnabled public without sharing static List<Task> getTasks(ID whoId) { return [SELECT Id, Subject, Status, CreatedDate, Owner.Name, Description, Type FROM Task WHERE isClosed=True AND WhoId=:whoId ORDER BY createdDate DESC]; } }
I have this class. Users cannot see tasks of other users despite "without sharing" declaration.
Any idea?
Thansk in advance
public without sharing class ClosedTaskListController { @AuraEnabled public without sharing static List<Task> getTasks(ID whoId) { return [SELECT Id, Subject, Status, CreatedDate, Owner.Name, Description, Type FROM Task WHERE isClosed=True AND WhoId=:whoId ORDER BY createdDate DESC]; } }
I have this class. Users cannot see tasks of other users despite "without sharing" declaration.
Any idea?
Thansk in advance
public without sharing class ClosedTaskListController {
@AuraEnabled public without sharing static List<Task> getTasks(ID whoId) {
List<Task> taskList = [SELECT Id, Subject, Status, CreatedDate, Owner.Name, Description, Type FROM Task WHERE isClosed=True AND WhoId=:whoId ORDER BY createdDate DESC];
return taskList;
}
}
Regards,
Pawan Kumar