> For the complete documentation index, see [llms.txt](https://learn.capstorm.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://learn.capstorm.com/copystorm-restore/frequently-asked-questions/how-do-i-restore-sent-emailmessages-with-linked-files.md).

# How Do I Restore ‘Sent’ EmailMessages With Linked Files?

In Salesforce, it is common to see attachments and files associated with *EmailMessage* records. The Salesforce API however has restrictions about linking *ContentDocumentLink* records to *EmailMessage* records over the API when the *EmailMessage* record status is not ‘Draft’ and produces an exception in this scenario. This information be found in the Salesforce Object Reference for *EmailMessage* [here](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_emailmessage.htm).

On the *EmailMessage* object however, there is a field called *IsClientManaged* that when true allows users to modify *EmailMessage.ContentDocumentId* sto link file attachments even when the *Status* of the *EmailMessage* is not set to ‘Draft’. As of the 10.64.3 GA release of CopyStorm/Restore, an additional parameter in the Restore Set Editor for *EmailMessage* can be selected to push *EmailMessage* records with IsClientManaged = true regardless of the value in the CopyStorm database.

NOTE: This behavior is disabled by default and must be enabled through the CopyStorm/Restore configuration file.

## How to Push *EmailMessage* Records with *IsClientManaged = true*

Follow the below steps to push *EmailMessage* records with the *IsClientManaged* field set to ‘true’ for all records:

* Open CopyStorm/Restore and navigate to the *Restore Set Editor* tab
* Click on *EmailMessage* in the lefthand list of objects
* In the *Select Records* section of the *EmailMessage Restore Rules* find the *Additional EmailMessage Parameters* section and check “Set IsClientManaged”

![](https://2924009365-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5FyPmqVkPxhj2oT8fbgB%2Fuploads%2Fgit-blob-3787c34b693f29fb3618e6e3c0d2ae880b00f8e5%2Fe66c1569-EmailMessage-IsClientManaged-Restore.png?alt=media)
