Enable archiving of over 800 lookups for each root record


    Simplifying the archiving of complex root objects.

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

    Introduction


    Once data is nominated for archiving, Archive finds the record ID in Salesforce, archives it with all Master Detail, and requested Lookup children, and then sends a separate deletion request to Salesforce with the root record ID and requested Lookup child record IDs. Archive currently supports up to 800 childrecord IDs per deletion.
    This article explains how to archive up to 10,000 child Lookup records under the Enable archiving of over 800 lookups for each root record toggle under the Advanced section of the Console Policy.

    Objects

    Master Details child records.
    Archiving a root record with multiple levels of Master Detail child and grandchild records does not require a separate deletion request.
    The entire hierarchical tree is archived and deleted from Salesforce by providing the root record ID.
    For example, when archiving an Account with Quote and Quote Line Items as Master Detail objects, all child records under the root Account are automatically archived, and the number of records archived is (almost) unlimited.
    Lookup child records
    Archiving a root record with multiple levels of Lookup child and grandchildren records requires a deletion request.
    Deleting the parent of a Lookup child record will delete the reference between them and may create an orphan record in Salesforce. 
    If a root record, for example, the Account, is also archived with multiple Lookup relation objects such as Cases and Email Lookups, these objects must be specified by their record ID, meaning the child records require a delete request.

    Deletion Request Types

    The current delete process applies an All or None logic.
    All or None
    The All or None deletion request ensures that all records specified for deletion are successfully deleted or none are deleted. The entire archiving process is rolled back if any part of the deletion process fails (such as due to an error or business logic). This ensures there are no duplicate records existing in Archive and in Salesforce.
    The archive process fails if a root record has more than 800 child record IDs with Lookup relations underneath it. This is because sending a single request with all Lookup child record IDs is impossible.

    Enable archiving of over 800 lookups for each root record 
    With this toggled on, Archive allows sending up to 10 batches of 1,000 records per deletion request.
    The Enable archiving of over 800 lookups for each root record allows the Archive policy to continue the archiving process, even when Salesforce fails to delete any Lookup child records. 

    • This process does not roll back but provides a list of failed records and the Salesforce error message explaining why they failed. This list is downloadable as a CSV file from the Activities tab.
    • Archive saves any duplicated record IDs that failed to be deleted and filters them out to prevent attempted re-archiving 

    Prerequisites

    The sum of all Lookup child records for a specific root record must be more than 999 records.
    If the number of child records is less than 999, All or None delete is applied.

    When Enable archiving of over 800 lookups for each root record is enabled, the All or None deletion request increases from 800 to 999 record IDs per batch.
    Enable archiving of over 800 lookups for each root record will operate only starting with the second batch of 1,000 records.
    The first delete request will remove records using the All or None method. This allows easy rollback if one or more records fail to be deleted. Only once the first 1,000 records have been successfully deleted and removed from Salesforce will the Enable archiving of over 800 lookups for each root record continue for the additional delete requests.


     

    « Previous ArticleNext Article »