+ Start a Discussion

Deleted Activities query

Hi Folks,


Some of the activities in our system automatically by mistakenly deleted by certain User, Could you please let me know whether can we get the details of those Activities by querying in anyway?


I knew we can restore the activities from Recycle bin,but the problem is that now in our recycle bin it has redundant as well as Useful activities.


Any help  on this is highly appreciated.





I think you can add to a query something like:


Where IsDeleted = true And LastModifiedById = :TheUsersID

Sfd developerSfd developer



You can query like,


List<Task> rsTasks = [SELECT Id FROM Task WHERE IsDeleted=true ALL ROWS]

List<Events> rsEvents = [SELECT Id FROM Event WHERE IsDeleted=true ALL ROWS]


Those query returns the list of deleted tasks and events.