Sometimes you want to delete all the records from an object and wonder how to do it ?
Here are some tips :
- Export all records (just record id should be fine) in Data loader or any ETL tool and use Delete operation to delete them. This will be a slower as this operation takes 200 records at a time. You can use bulk API but won’t make much difference
- Write a batch class to query and delete records. I hope you won’t do it just to delete records :).
- Use Truncate button on the object detail page to delete all the records at once. But this button should enabled and can only work for custom objects.
Hope this helps some one out there. ..
Keep reading and sharing. ..
Leave a Reply