Salesforce: Truncate records from custom object in salesforce without using apex code

|
| By Webner

Truncate records from custom object in Salesforce without using apex code

Salesforce provides a feature to delete bulk records for the standard objects. This can be achieved by navigating Setup -> Data Management-> Mass Delete Records.

But in case we want to delete large amount of records for a custom object, then what the first thing strikes to our mind is,
go to developer console, query complete list on that particular object, select rows and then click on delete button (since delete operation is not available in SOQL)

This process takes a lot of time and slows down our system since deleting each record consumes a lot of memory.

Workaround :

Go to Setup-> Customize -> User Interface -> Check the checkbox – Enable Custom Object Truncate.

Now navigate to the custom object from Setup-> Create -> Objects -> Custom object. You will find a “Truncate” button is available now. Click on it, a pop-up window will appear. Enter the custom object’s API name whose record you want to clear out and click ok. All the records will be deleted in few seconds.

Leave a Reply

Your email address will not be published. Required fields are marked *