The Overrides tab supports adding and removing relationships between tables, and is an essential tool when Salesforce metadata contains inaccuracies or ambiguities. In practice, options on this page should not be changed unless instructed to by Capstorm support.

Most of the overrides necessary are probably already built into CopyStorm/Restore and you will not need any additional overrides.

The Salesforce Asset table showcases the need for overrides in order to build a good restore plan. The Asset table’s metadata claims that both of the ContactId and AccountId columns are nillable. Though technically true, it is also true that both Account and Contact must be restored before asset because the Asset table does not allow both Asset.ContactId and Asset.AccountId to be null. CopyStorm/Restore forces the correct order for restoration by overriding the relationships between Asset/Contact and Asset/Account to be required for the purposes of deciding the order in which tables are restored.

If this was done using the GUI, the entry would have:

  • A Rule Type of Forced
  • A Parent Table of Account
  • A Child Table of Asset

A similar rule would be defined for the Contact/Asset relationship.

There are several types of dependency rules that can be added.

Forced Dependency Rule

A Forced Dependency rule states that all records in a parent table must be restored before records in a child table.

Ignored Dependency Rule

An Ignored Dependency rule states that CopyStorm/Restore should ignore a parent/child table relationship even if it is defined in Salesforce metadata. An example of this is the relationship between ContentDocument and ContentVersion. The ContentVersion table must be restored before ContentDocument because the only way to create a ContentDocument record is as a side effect of creating a ContentVersion. However, Salesforce metadata declares that there is a non-nillable parent/child relationship from ContentDocument to ContentVersion.

Pseudo Dependency Rule

A Pseudo Dependency rule states that CopyStorm/Restore should act as if there is a required relationship between two tables even when Salesforce metadata indicates no relationship. The purpose of this rule is to force one table to be restored before another.