Tag Archives: Custom Object

Truncate Custom Objects in Salesforce.

Truncating a custom object allows Salesforce to delete all records from particular objects and save the empty object and its metadata. This is a fast way to delete all records from custom objects compared to Import Wizard and Data Import Wizard. This action will remove records from custom objects and you cannot recover them from the recycle bin.

Enable Truncate for custom objects: Before using this feature for your organization, you must enable it. To do this, follow these instructions:

  1. Go to Setup | Build | Customize | User Interface.
  2. 2. On the user interface page, navigate to the Setup section.
  3. Select the Enable Custom Object Truncate checkbox, as shown in the following screenshot:
  4. Click on Save.

Performing Truncate for custom objects: You can use this feature when you have created a custom object and filled it with test records. To delete those test records with a single action, you can use this feature. To perform this action, follow these instructions:

  1. Go to Setup | Build | Create | Objects.
  2. Identify the object on which you want to perform this action and click on an object name to go to its detail page. In this example, Waypoint Object is selected.
  3. Click on the Truncate button, as shown in the following screenshot:
  4. It will pop up a window. Read the warning message carefully and type the
    object name as shown in the following screenshot:
  5. Click on the Truncate button to complete the process.

Notes:

  • Truncating a custom object permanently removes all of its records.
  • You can’t recover the records from the Recycle Bin.
  • A copy of the truncated object appears in the Deleted Objects list for 15 days, during this period the object and its records continue to count toward your organization’s limits, and then the copied object and its records are permanently deleted.
  • You cannot truncate object with one or more child objects as containing data, this include Master-Detail and Lookup relationship.
  • If you have any auto-number field, the number will be continue from truncated object.
  • You cannot truncate custom objects, that are referenced by another object through a lookup field or that are on the master side of a master-detail relationship.
  • You cannot truncate custom objects, that are referenced in a reporting snapshot, or have a custom index or an external ID, or have activated skinny tables.