Do you want to delete custom object Salesforce?
In this Salesforce, I will explain the Salesforce delete object. I will also explain how to delete custom object in Salesforce Lightning and Salesforce Classic.
Additionally, I will explain the procedure of salesforce mass delete custom object records.
Delete Custom Object Salesforce
Before, you will learn to delete the custom object and the data record of the custom object. It is very important to know about some unique cases which you can’t delete.
In Salesforce, deleting the custom object is required when you want to clean up the system. When you delete the custom object salesforce, it goes to the special list “Deleted Objects” and it keep deleted objects for 15 days.
During this 15-day period, you can restore the deleted objects and their data, but after that, the object and its data are permanently deleted from the system.
Additionally, there are some scenarios in which you can’t delete the custom object in Salesforce:
- You can’t delete the custom objects that are on the master side of a master-detail relationship.
- If custom fields of the custom object are used in a roll-up summary field on another object, you can’t delete the object.
- You can’t delete the custom object if you used it somewhere in Apex code, Visualforce page, reporting, duplicate rule, matching rule, etc.
- If there are more than 100, 000 records in the custom object, you can’t delete it for this you need to delte the some records first.
With this you have learned custom object delete Salesforce.
How to Delete Custom Objects in Salesforce
In Salesforce you can delete the custom object in both Salesforce Lightning and Salesforce Classic.
Additionally, it is available in the following editions: Contact Manager, Group, Professional, Enterprise, Performance, Unlimited, Developer, and Database.com.
Salesforce Delete Object in Lightning
The following are the steps to delete objects in Salesforce Lightning:
Step-1: Go to the “Setup” and click on the “Object Manager” tab, and you will get the list of all the objects, either Standard or Classic.

Step-2: Choose the custom objects that you want to delete. After selecting the object, you can see the Details page of the custom object is open.

Step-3: At the top left corner of the details page, you will get the “Delete” button; click on it

Step-4: You will get the pop-up, read it carefully, and then click on the “Delete” button.

How to Delete an Object in Salesforce Classic
The following are the delete an object in Salesforce Classic:
Step-1: Log in to the salesforce account, click on the “Setup” icon, and then scroll to the bottom of the page. On the left side, there is a “Build” section; click on the “Create” dropdown from here.

Step 2: Select the “Objects” option and here you will get the list of the custom objects in Salesforce Classic.

Step-3: Select the custom objects that you want to delete. There are two ways to delete a custom object: either click on the “Del” button next to the object or click on the “Object Name” and then click on the “Delete” button on the detail page of the specific object.

Step-4: A pop-up will display on the screen. Read the messages carefully, then select “Yes, I want to delete the custom object” to confirm and click the “Delete” button.

Salesforce Mass Delete Custom Object Records
You can delete the mass records stored in a custom object in Salesforce using different ways. The following are the ways to do so:
1. Mass delete the records is using data loader in Salesforce. It is the most suitable way to do this as it saves time and gets multiple records in one go.
2. Using Truncate Function Salesforce Bulk Delete Custom Object Records
In Salesforce, you have a truncate function that deletes all the records in the custom table, i.e., from custom objects. The only drawback of this function is it is only available in Salesforce Classic.
Below are the steps to Salesforce delete all records from object.
Step-1: Login to the Classic Interface of the Salesforce account. Click on the “Setup” option.

Step-2: Scroll down to the “Build” section -> Expand “Customize” dropdown -> Select “User Interface”.

Step-3: Find “Enable Custom Object Truncate” in the “Setup” section and its checkbox.
Step-4: Click on the “Save” button.

Step-5: Scroll down to the “Build” section -> Expand “Create” dropdown -> Select “Object” option.

Step-6: Choose the object whose records you want to delete. On the detail page, you will get the “Truncate” button; click on it.

Step-7: Pop-up will open here fill the name of the object whose record you want to delete. After that, click on the “Truncate” button.

Conclusion:
I hope you have understood how to delete custom object salesforce. I have also explained step-by-step salesforce mass delete custom object records.
You may like to read:
- How to Set Tab Style in Salesforce
- How to Bulk Add Leads in Salesforce
- How to Create Compact Layout in Salesforce
- How to Delete Custom App in Salesforce?
- How to Disable Apps at Profile Level in Salesforce

Tanya is a Salesforce consultant working in a reputed organization and holds expertise in both Salesforce administration and development. She has experience in Salesforce integration, reports, dashboards, automation data analytics, etc., and trained hundreds of Salesforce enthusiasts and delivered various Salesforce projects and solutions. Read more | LinkedIn Profile