Activity Forums Salesforce® Discussions In salesforce how can we find out the deleted record in After delete trigger? Reply To: In salesforce how can we find out the deleted record in After delete trigger?

  • PRANAV

    Member
    January 6, 2017 at 2:52 pm

    Hi Sushant,
    To get or Query deleted records you need to use ALL ROWS So your query will be

    List<Object__c> lisOfDeletedRecords = [SELECT Id FROM Object__c WHERE ID IN :lstTriggerOld AND ID NOT IN : lstAllRecords ALL ROWS];

    Hope this helps you.

    Thanks