> For the complete documentation index, see [llms.txt](https://docs.flosum.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flosum.com/backup-and-archive/backup-and-archive/archives/enabling-retain-this-object-for-a-templated-archive.md).

# Enabling Retain This Object for a Templated Archive

{% hint style="success" %}

#### Required User Credentials

\[**Flosum User**] - **Backup & Archive** license with **Backup & Archive** permissions
{% endhint %}

## <img src="https://646917531-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Focom3JROuDKOidclKbQx%2Fuploads%2Fgit-blob-3f6faa4230b72167926fbc0a31dd17dc7d74581d%2FSummary2-Small-Icon.svg?alt=media" alt="" data-size="original">Overview

The **Retain This Object** feature provides greater control over which objects are deleted in Salesforce. With this feature, you can mark objects added to an archive as **Retained**, meaning that the object will be included in the archive but also remain in Salesforce. A child object that is not **retained** will still be deleted. The instructions below demonstrate how to use this feature and provide examples to illustrate the expected outcome.

{% hint style="info" %}
By default, objects do not have **Retain This Object** enabled, which means they will be deleted from Salesforce when archived.
{% endhint %}

<table><thead><tr><th width="76">Icon</th><th>Description</th></tr></thead><tbody><tr><td><img src="https://646917531-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Focom3JROuDKOidclKbQx%2Fuploads%2Fgit-blob-495996e1b962f62cadd244e22eca5bb571c24fe8%2FArchiveTemplate-RetainIcon.png?alt=media" alt=""></td><td>The <strong>Green Shield</strong> icon indicates that the object is marked for retention. However, if the object depends on its parent and the parent is deleted, the object will also be deleted, even though it is marked for retention.</td></tr><tr><td><img src="https://646917531-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Focom3JROuDKOidclKbQx%2Fuploads%2Fgit-blob-2c8b832f9b92cd020087adcd8cce9245d31e3d1d%2FArchiveTemplate-DependentIcon.png?alt=media" alt="" data-size="original"></td><td>The <strong>Red Lock</strong> icon signifies that the object depends on its parent. This means if the parent object is deleted, the child object will also be deleted.</td></tr></tbody></table>

## Enabling Retain This Object

1. Click an object to open the **Add child objects** dialog.
2. Click the **Retain this object** toggle to enable it.
3. Click **Apply** to save the changes.

   <div align="left"><figure><img src="https://646917531-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Focom3JROuDKOidclKbQx%2Fuploads%2Fgit-blob-b5ba48a03250540c43313b9394984a3d5238f225%2FEnablingRetainThisObjectForATemplatedArchive-Retain-01.png?alt=media" alt="" width="563"><figcaption></figcaption></figure></div>
4. Once the **Retain this object** toggle is enabled, a **Green Shield** icon will appear next to the object.

   <div align="left"><figure><img src="https://646917531-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Focom3JROuDKOidclKbQx%2Fuploads%2Fgit-blob-a29285e54110dc7cc9b51fd35e0f55fb7404aceb%2FEnablingRetainThisObjectForATemplatedArchive-Retain-02.png?alt=media" alt="" width="563"><figcaption></figcaption></figure></div>

## Examples

Below are four examples that show different scenarios with **Retain This Object** enabled. Each example explains which settings are used, which objects will be retained in Salesforce, and which will be deleted.

{% stepper %}
{% step %}

### Example: 1

In this example, the **Contact** and **Contact >> Contract** objects are both marked as **Retained**. The screenshot below indicates which objects will be deleted from Salesforce and which will be saved.

{% hint style="info" %}
The **Case**, **Contract**, and **Service Contract** objects each have dependent child objects that will also be deleted. It’s important to understand that a cascading delete can extend through multiple levels of objects. However, for simplicity, this example lists only the child objects that are directly dependent on the root parent.
{% endhint %}

<div align="left"><figure><img src="https://646917531-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Focom3JROuDKOidclKbQx%2Fuploads%2Fgit-blob-52353060c4e0f41d4b30565b5405c935e6fff243%2FEnablingRetainThisObjectForATemplatedArchive-Retain-03.png?alt=media" alt="" width="563"><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}

### Example: 2

In this example, only the **Contact >> Contract** object is marked as **Retained**. However, because **Contact >> Contract** depends on its parent, it will still be deleted when Contact is deleted, triggering a cascading delete of **Contact >> Contract**. The screenshot below indicates which objects will be deleted from Salesforce and which will be saved.

{% hint style="info" %}
This example illustrates the importance of understanding how dependency works when using the **Retain This Object** feature. Objects marked as **Retained** will still be deleted if they are dependent on a parent that is deleted.
{% endhint %}

<div align="left"><figure><img src="https://646917531-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Focom3JROuDKOidclKbQx%2Fuploads%2Fgit-blob-bc3102d136513329f053c786949744efd81eccc3%2FEnablingRetainThisObjectForATemplatedArchive-Retain-04.png?alt=media" alt="" width="563"><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}

### Example: 3

In this example, only the **Contact >> Client Answer** object is marked as **Retained**. Since **Contact >> Client Answer** is not dependent on its parent, it will be saved even after the **Contact** object is deleted. The screenshot below indicates which objects will be deleted from Salesforce and which will be saved.

<div align="left"><figure><img src="https://646917531-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Focom3JROuDKOidclKbQx%2Fuploads%2Fgit-blob-e5a1a7cf302ff55eb01b5256a193f9278a7e78ac%2FEnablingRetainThisObjectForATemplatedArchive-Retain-05.png?alt=media" alt="" width="563"><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}

### Example: 4

In this example, all objects are marked as **Retained** except for **Contact >> Content Document**. This is a practical example of archiving files attached to a contact while retaining the rest of the Contact record in Salesforce. The screenshot below indicates which objects will be deleted from Salesforce and which will be saved.

<div align="left"><figure><img src="https://646917531-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Focom3JROuDKOidclKbQx%2Fuploads%2Fgit-blob-0e5786f621d8e4198bd0ef67ac6b88b7b1e23e7b%2FEnablingRetainThisObjectForATemplatedArchive-Retain-06.png?alt=media" alt="" width="563"><figcaption></figcaption></figure></div>
{% endstep %}
{% endstepper %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.flosum.com/backup-and-archive/backup-and-archive/archives/enabling-retain-this-object-for-a-templated-archive.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
