Activity Forums Salesforce® Discussions 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

  • shariq

    Member
    July 17, 2017 at 1:58 pm

    Hi Sushant,

    You can use Trigger.old method in trigger, for example :- [SELECT Id FROM Sobject__c WHERE Id IN : Trigger.old AND Id NOT IN : (List which includes all Sobject__c's Id)];

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos