Truncation is a process of permanently deleting all records from a custom object while keeping the object and its metadata intact for future use. It is a quick way to delete all records for custom objects compared to the Import Wizard and Data Import Wizard. Truncation is often used to remove test records from an object while keeping objects intact, or to reduce the resources needed to store a certain object. In Salesforce, truncating custom objects is an irreversible action, similar to the bulk delete option for standard objects.
However, Salesforce cannot truncate custom objects that are referenced by other objects or referenced in a report snapshot. Truncation is a useful tool for Salesforce users who need to delete all records from a custom object quickly and easily. To truncate a custom object, users must first ensure that the object is not referenced by any other objects or referenced in a report snapshot. Once this is confirmed, users can follow the simple steps to truncate the custom object.
The first step is to open the Setup menu and select the Object Manager tab. From there, users can select the custom object they wish to truncate and click on the Delete Records button. This will open a pop-up window with two options: “Delete All Records” and “Truncate All Records”. Selecting “Truncate All Records” will permanently delete all records from the custom object while keeping the object and its metadata intact for future use.
Truncating custom objects is an effective way to remove unnecessary information that was added to test the functionality of a new initiative for which a custom object was created. After following these simple steps, users can focus on more important business activities without worrying about unnecessary data cluttering up their system.