You need to sign in to do that
Don't have an account?
Trying to see who deleted specific tasks (SOQL)
I am trying to find our deleted and completed tasks using the following query:
select id, accountid, subject, result_codes_TASK__c, lastmodifieddate from Task
where isdeleted = true AND isclosed = true AND result_codes_TASK__c <> 'NA' AND result_codes_TASK__c <> 'Action'
order by lastmodifieddate
However I am finding that the lastmodifiedbyid and the lastmodifieddate are not the same as the user and date in the recylce bin.
I tested it by deleting someone elses completed task, and it still showed their information in the lastmodified fields.
Any help here would be much appreciated.
in salesforce record get stored in recycle bin for 15 Days so you need to also remove these delete items from recycle bin also.
You can apply SOQL using where clauses isDeleted = true.
then get LastModifiedbyID
this id should be idof any user who delete these records
we are also checking isDeleted = true