Archiving Multi Level Objects

    This functionality is available from the Archive Console’s policies tab on instances with Archive Package 21 and above installed. 

    Background

    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.

    Creating and Editing Policies in the Archive Package

    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.

    NOTE: Policies created or edited in the Archive Console cannot be drilled into or edited from the Archive Package.


    Creating and Editing Policies in the Archive Console

    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.

    • Single Level - One level down the hierarchical structure.
    • Multi Level - allows for relationship drill down and selection to 10 levels.
    • All - archive the root object and the entire hierarchical relationship with it.
    NOTE: Selecting All does not display the hierarchical structure in the schema. See Archiving All below.

    Multi Level Archiving from the Console

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

    Objects with a grayed-out checkmark will be auto-archived with the root object because a master-detail or restricted lookup relationship exists. To identify restricted lookups, click the Hide Master Details checkbox. This shows the first level of restricted lookups only. Restricted lookups will remain in view.
    +Objects available for selection

    V

    >

    Access to drill down.
    Expand the section to reveal the next level of related objects. 
    Non-editable master detail-related objects and/or a restricted lookup relationship exist.

    Object selected.


    To archive multi-level lookup objects:

    1. Select Multi-Level
    2. Click the + icon of a lookup child object.
      The hierarchical tree opens up with the first level of direct children displayed. 
    3. A blue checkmark indicates your selection.
    4. Click the > arrow icon to expand master details/restricted and view child objects below.
    NOTE: This does not automatically check children underneath. A selected lookup only refers to the lookup itself. 
    The lookup children below must be selected separately.
    The next level of the hierarchical tree opens up with the next level of children displayed. 
    Lookup objects are selectable. Master details and restricted lookups show a locked icon. These objects are not selectable. However, you can click to view and select lookup objects underneath.
    1.  Click Save
      The policy is set to archive the root record with all the selected lookup relations across all levels.
      Note: If a child object is selected and its parent is later unselected during editing, the child object will be excluded to prevent orphans in the system.
       
    Important to Note!
    1. sObject types often appear multiple times in a schema diagram due to complex relationship structures.
    When an object type is repeated, all instances of that object and associated relationships are treated identically, following the same archiving criteria. 
    For example, once "Cases" is checked in any part of the hierarchy, all reoccurrences will automatically be checked throughout the tree. 
    2. Child objects under the same object type become leaf nodes without direct child objects to prevent infinite loops. Therefore, lower occurrences of the same object type cannot be drilled down. When attempting to click the checkbox, a message displays: This object has already been selected and cannot be drilled down from here. 

    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:

    • Records underneath will be archived together with the root object.
    • No limitations or dependencies exist to prevent the whole object from being deleted from Salesforce. 

    Viewing Policies

    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.

    NOTE: To drill down through the structure, first select the object. Selecting the object allows you to unfold the branches for viewing and selecting when applicable.


    Archive Search/Widget Search

    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.

    Unarchive

    When unarchiving a lookup relation object, begin by unarchiving the root. The lookups are returned intact, pointing to their descendant objects.

    Limitations

    Not currently supported:

    • Junction Objects are supported only by one side.
       
    • Side branches refer to lookup children that point to a different parent, which is not displayed or selectable within the hierarchical schema.
       
    « Previous ArticleNext Article »


    Contact Us

    Sometimes you just want to talk to someone. Our customer support team is available by phone:
    Request a Technical Support Call Back