# 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)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://learn.capstorm.com/copystorm-restore/frequently-asked-questions/how-do-i-restore-sent-emailmessages-with-linked-files.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
