What is the simplest and fasted way to delete all records from a custom object? Do it from Developer Console by writing a few lines of Apex Code. Right? Well not really. To delete all records from a custom object, just navigate to the custom object definition, click on ‘Truncate’ and that’s it.

Delete all Records from Custom Object

For the ‘Truncate’ option to show on custom object, do not forget to check ‘Enable Custom Object Truncate’ from Setup -> Customize -> User Interface as shown below

Enable Custom Object Truncate

Points to Note:
  • ‘Truncate’ button is only available in Classic and won’t be visible in Lightning Experience (LEX)
  • If you don’t see the ‘Truncate’ button on custom object, then please review the article ‘Truncating Custom Objects’ as mentioned below
  • For safety reasons, I will recommend keep the checkbox unchecked Production Environment.
References & Useful URLs:
  1. Truncate Custom Objects – Help Article (5 mins) – https://help.salesforce.com/articleView?id=dev_object_trunc.htm&type=5
  2. Truncating Custom Objects – Help Article (5 mins) – https://help.salesforce.com/articleView?id=dev_object_trunc_overview.htm&type=5
Change Log:
  • 1st Published on 07-Jan-2014
  • Reviewed & Updated on 24-Oct-2020