So, you deleted a field and now you need it back? It’s happened to the best of us. The question is, where is your deleted field? How do you get it back, and is there anything else you need to do once it’s restored?
In this article, we’ll answer these three important questions so you know exactly how to restore a deleted field in Salesforce without any issues.
How to Delete a Field in Salesforce
First, here’s a quick recap on how we delete fields in Salesforce. Simply navigate to the object: go to Setup, followed by Object Manager, and [Object Name]. Then go to Fields & Relationships and find your field. Click the drop down to the right, followed by Delete.
Where Is My Deleted Field?
Did you try looking in the recycle bin, only to discover it wasn’t there? No judgment – I’ve done that too! Deleted records, reports, and dashboards end up in the recycle bin, but deleted fields go somewhere else…
From Setup, go to Object Manager and [Object Name], followed by Fields & Relationships. Then click on Deleted Field at the top of the screen.
From the Deleted Fields screen you have the option to Erase and Undelete.
Deleted fields will stay here for 15 days unless you erase them (permanently hard delete) or undelete.
How to Restore a Deleted Field
From the Deleted Fields, screen click Undelete.
Wait, we’re not done yet! There are a number of manual steps required to fully restore the field.
Make sure you review this list of considerations and take appropriate action:
- If any page layouts were edited while the field was deleted, it will have been removed and will also need to be manually re-added to the page layouts.
- Restored fields are no longer marked as required – edit the field and mark as required if needed.
- Restored fields are no longer marked as unique – edit the field and mark as unique if needed.
- Deleted fields are removed from any AppExchange package(s), so you’ll need to re-add the field to the package/s.
- Relationship fields are converted to lookup fields upon deletion, so you’ll need to edit and restore any master-detail relationships.
- Field dependencies are removed when a field is deleted and will need to be recreated.
- Formula fields should be edited and saved to prompt syntax check.
- If field history tracking was amended while the field was deleted, you’ll need to re-add the field to field history checking.
- The field name and API name will be amended with “_del” and “_del__c” respectively. Edit the field and remove “_del”.
Deleting and undeleting fields is super simple in Salesforce, but be sure to make any necessary manual amendments after restoring a field to avoid errors and issues!
- Salesforce Help: Manage Deleted Custom Fields
- Salesforce Help: Manually Restore Attributes of Deleted Fields