function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Venkata Shiva Koushik RachapudiVenkata Shiva Koushik Rachapudi 

Delete Batch Apex on Leads, Create a CSV

I have a batch class that deletes a query in which the condition states if certain checkbox == true delete that record.
i have got that batch class running perfectly and is scheduled for daily, all i need to know now is, Is there a way to get the list of deleted Scope in Email without the email cutting it short i.e if 200 records are deleted i would need the Name(Fname+LName) and Email Id sent out to my email. or atleast as a CSV file so as to verify if important data is deleted too.
Rahul KumarRahul Kumar (Salesforce Developers) 
Hi Venkata,

May I suggest you please refer the below link to reference.  hope it helps.

Please mark it as best answer if the information is informative.so that question is removed from an unanswered question and appear as a proper solution.

Thanks
Rahul Kumar
Venkata Shiva Koushik RachapudiVenkata Shiva Koushik Rachapudi
Hey Rahul,
That was not the exact point, i want it automated, the junk leads are deleted every night and i cant pull them to excel everyday before they are deleted, i want a way to send out an email with the records deleted in that batch, but when using single message or email, it cuts off the information showing just the first few records that are deleted followed by ' ........'  example  : batch deleted 300 records. 
{name = xyz, email xyz@gmail.com, name = abc, email abc@gmail.com,name = def, email def@gmail.com,name = hij, email hij@gmail.com,name = klm, email klm@gmail.com,. ...........}