How to Restore Archived Cases with Emails and File Attachments
Overview
Restoring archived objects that include emails and file attachments requires properly archiving the original case objects along with their related emails and files. This guide details the process of successfully archiving and restoring Case objects containing Emails and file attachments using the Backup & Archive application.
Prerequistes
The following conditions are required to complete the instructions in the article. Each is explained in more detail in the sections below.
To complete this example, ensure you are familiar with the following actions in Backup & Archive:
Create an Archive: Creating a Templated Archive
Create Restore Job: Creating an Archive Restore Job (Preparation)
Execute Restore Job: Running a Restore Job (Execution)
Create Archive Template for Emails and File Attachments
To ensure all related records and attachments are archived and restorable, the archive template must be configured with proper parent-child relationships. See the basic structure below, along with a screenshot of an example Archive Template.
Case - Parent Object
Content Document - Files related to the Case object
Email Message - Emails related to the Case object
Content Document - Files related to the Email Messages object

Important
Files attached to Email Message objects appear in the Case object's Files related list due to the internal Combined Attachment object. Here are key points to note:
Not Directly Related: The Combined Attachment object is not directly related to the Case object.
API Restrictions: It is not queryable or restorable via API.
Restore Caution: If you don't include the Content Document object under Email Message in the archive template, email attachments will neither be backed up nor restored.
Assign the “Update Email Messages” Permission
Restoring Email Messages with attachments requires the user performing the restore to have the “Update Email Messages” system permission. This is necessary to re-establish relationships between EmailMessages and files, and to update fields such as To, From, Cc, Bcc, and ContentDocument references. Follow these steps:
Log in to your Salesforce org.
Go to Setup
In Quick Find, search for Permission Sets.
Click New or open an existing permission set.
Navigate to System Permissions.
Click Edit.
Search for Update Email Messages and check the box.
Click Save.
Click Manage Assignments > Add Assignments.
Select the user who is used to connect your Salesforce org with your Flosum Cloud Apps.
Click Assign.
What happens without the Update Email Messages permission?
Email records and files may be restored, but:
ContentDocumentLink relationships will not be restored.
Attachments will not appear in the related list of the restored EmailMessage.
Files may still exist in Salesforce, but will not be accessible from the restored email.
View Restored Emails and Attachments
To verify restored records:
Navigate to the restored Case record
In Activity History, find the restored email
Open the EmailMessage record
In the Related section, click on Attachments
Files attached to the email will appear here
Why are restored email attachments not appearing on the Attachments page?
The Notes & Attachments section uses the CombinedAttachment object.
This object cannot be created or restored via the API. (Salesforce Limitation)
Restored files won’t be shown in the Notes & Attachments section.
Images are Embedded in the email body.
Embedded images are stored through CaseFeed, which is not creatable/updatable via API. (Salesforce Limitation)
The images are restored as files, but won’t render inline in emails.
Last updated
Was this helpful?