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
EmmaJ1234EmmaJ1234 

How to bulk delete custom objects?

Hi,

I am looking to bulk delete all records that I have added to my custom object. Could someone please suggest a way that I can do this?

Thanks, Emma
Best Answer chosen by EmmaJ1234
John NeffJohn Neff
Hi Emma, 

I reccomend Dataloader.io - especially if you are new to bulk deletion. 

Simply run a report that contains all the record ID's of the custom object records - export to excel, and then upload the file to dataloader.io

Here is a link: https://dataloader.io/

Thanks!

All Answers

Pankaj_GanwaniPankaj_Ganwani
Hi,

You can use either data loader or workbench to perform the same.

Thanks,
Pankaj
John NeffJohn Neff
Hi Emma, 

I reccomend Dataloader.io - especially if you are new to bulk deletion. 

Simply run a report that contains all the record ID's of the custom object records - export to excel, and then upload the file to dataloader.io

Here is a link: https://dataloader.io/

Thanks!
This was selected as the best answer
M SM S
Hi, 

Extract all the record Ids from the custom object using Dataloader, WorkBench or Using a query in your developer console. 
Then you can delete these ids with using any of the above mentioned tools.

Using Data Loader and work bench needs to have the Ids in a CSV file.

URL for Workbench ------ https://workbench.developerforce.com/login.php

Thanks
MS
EmmaJ1234EmmaJ1234
Thanks for your help all. I will test these ideas and will let you know if I have any further questions!

Thanks, Emma
Sabina BashukSabina Bashuk
It depends on your scenario. With Skyvia data integration tool (https://skyvia.com/connectors/salesforce) you have two options:
1) Use Skyvia Import and "Delete operation"
2) Use Skyvia Query to create a subset of custom objects you need to delete.

Please provide more detail, so that I could advise accordingly.
Michael TomarMichael Tomar

My favorite tool was already mentioned by Sabina here. Skyvia has a complete tutorial, here's the link: https://skyvia.com/blog/how-to-mass-delete-records-from-salesforce-using-sql-or-data-loader

Also you can use this ready-made SQL query to bulk delete custom objects (https://skyvia.com/gallery/salesforce-mass-delete-all-records-from-custom-object):

DELETE FROM "Custom_object"

Seth StollSeth Stoll
Agree.  Skyvia is the way to go!  Thanks for linking the tutorial @Michael Tomar.