This functionality is available from the Archive Console’s policies tab on instances with Archive Package 21 and above installed.
Data in systems like Salesforce often has complex hierarchical relationships, where records are interconnected across multiple levels. For instance, an Account might have related Contacts, which in turn have related Tasks, and so on.
Archiving one record at the top of this hierarchy (the root) requires understanding and processing all related records down the hierarchy to maintain their links and prevent creating orphan records at lower levels. Some hierarchical relationships can extend several levels deep, and Archive supports multi-level archiving, down to 10 levels, to keep descendant records together with the root object.
Policies can be created from the Archive Package or the Archive Console. The Archive Package only supports single-level lookup relationship archiving, while the Console supports single- and multi-level archiving.
Once created, the policy can be viewed, edited, and run from the Console with multi-level archiving capabilities. Viewing or editing a policy created from the Package opens in Single-Level archiving mode by default. Switch to multi-level archiving by clicking the Multi-Level tab.
Policies created or edited in the Console, open by default in the Multi Level archiving tab. You can switch to single-level archiving mode (or All) if required.
When creating or editing an archiving policy, the schema on the right side of the screen displays the hierarchical tree of master-detail, and lookup relationship objects to the selected sObject. You can click on the first level of the object hierarchy to drill down, view, and select its descendants (where relevant).
V
>
✓
To archive multi-level lookup objects:
This object type is a recurrence of its ancestor.
3. Check the Archive Settings to verify that certain master detail objects will not be omitted due to the override settings on: Feed Objects History Objects Exclude Share
* All Archiving Selecting All archives the root object, and all descendants. We strongly recommend Admins validate and approve that:
A policy created from the Archive Policy can be viewed from the Console. When an existing policy is opened, it is from the Single Level tab. Switch to Multi Level to drill down and continue into additional levels on selected child objects as needed.
Users can search for a root record archived with multiple levels of relationships. Click on a record identified in the Search results. Click the Related tab to view related lookups and continue to drill down to levels based on the current schema structure.
When unarchiving a lookup relation object, begin by unarchiving the root. The lookups are returned intact, pointing to their descendant objects.
Not currently supported: