Loading
Extend Salesforce with Clicks, Not Code
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Considerations for Truncating Custom Objects

          Considerations for Truncating Custom Objects

          It’s important to understand what truncating an object does before you use it to remove records.

          Required Editions

          Important
          Important Where possible, we changed noninclusive terms to align with our company value of Equality. We maintained certain terms to avoid any effect on customer implementations.
          Available in: both Salesforce Classic and Lightning Experience
          Available in: Contact Manager, Group, Professional, Enterprise, Performance, Unlimited, Developer, and Database.com Editions

          Truncating a custom object lets you remove all of the object’s records, while keeping the object and its metadata. Truncating custom objects is similar to the mass delete option available for standard objects.

          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 org’s limits—and then the copied object and its records are permanently deleted.

          In contrast, if you delete a custom object, the object moves to the Deleted Objects list for 15 days. After that the object and its records are permanently deleted.

          Important
          Important Truncated custom objects can’t be restored to their original state.

          You can’t truncate standard objects or custom objects that:

          • Are referenced by another object through a lookup field or that are on the master side of a master-detail relationship
          • Are referenced in a reporting snapshot
          • Have a custom index or an external ID
          • Have activated skinny tables

          In addition, you can’t truncate custom objects when your org has reached its limit on allowed custom objects.

          Truncating a custom object erases:

          • All records currently sitting in the custom object’s Recycle Bin
          • The custom object’s history
          • Related events, tasks, notes, and attachments for each deleted record

          Truncating a custom object breaks:

          • Bookmarks to the truncated object and its records. If someone clicks a bookmark to the truncated custom object or to a deleted record’s URL, Salesforce displays an Insufficient Privileges message.
          • Apex scripts and Visualforce pages with references to a truncated object or record.

          After truncating a custom object, you can continue to use the custom object and add new records. Salesforce preserves:

          • The custom object definition and all related definitions
          • Workflow rules, actions, and triggers
          • Sharing rules associated with the custom object
          • Validation rules and approval processes
          • Master-detail relationships and formula fields
          • Translations
          • Mobile configuration settings

          When working with truncated objects, keep in mind:

          • The truncated object tab has a new URL, so new bookmarks need to be created.
          • List views and reports must be refreshed after truncation.
          • Roll-up summary fields must be recalculated after truncation.
          • There’s no support for truncation in the API.
          • To truncate objects that contain master-detail relationships, first truncate the detail (child) objects and then the (master) parent objects, working your way up the relationship tree.
           
          Loading
          Salesforce Help | Article