# Reference Fields Restore Editor

Salesforce records often contain references to other records. For example:

* Contact records contain a reference to an Account in their AccountId field.
* Nearly all records contain a reference to the Salesforce user who owns the record in an OwnerId field.

The Reference Fields portion of the Restore Set Editor defines the action which should be taken if a record references another record that is neither:

* Already in Salesforce.
* Restored by another table rule.

This editor contains three columns for each reference field:

1. A checkbox which determines whether or not the reference field should be restored.
   1. If not checked the field will not be modified on an UPDATE and will take the default value on an INSERT.
2. The name of the reference field with a superscript indicating the Salesforce table to which it refers.
3. The action to take if the value of the reference field in CopyStorm points to a record not present in the target Salesforce.

The following screen shot lists the reference fields for the Account table in a default Salesforce instance:

![](https://2924009365-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5FyPmqVkPxhj2oT8fbgB%2Fuploads%2Fgit-blob-01c48fc8a11ea609218b3fafd16d0b3f202174cb%2F2f136d1e-ReferenceFieldsRestoreEditor_P1.jpg?alt=media)

For all reference fields EXCEPT those referencing the Salesforce User table, the following options will be available:

| Option        | Description                                                                                 |
| ------------- | ------------------------------------------------------------------------------------------- |
| Set to Null   | If the referenced record is not already in Salesforce then set the reference field to null. |
| Skip Record   | If the referenced record is not already in Salesforce then do not restore the record.       |
| Create Record | If necessary, create the referenced record in Salesforce.                                   |

Reference field linking to the Salesforce User table have a different set of options. Common reference fields of this type include “OwnerId”, “CreatedById”, and “LastModifiedById”.

Salesforce User references are treated differently because Salesforce will not permit a record to be created with an owner that is an inactive Salesforce User.

| Option      | Description                                                                                                                                                           |
| ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Use Default | If the referenced User record is missing or is an inactive Salesforce User then use the Salesforce User specified as the default User on the “Global Parameters” tab. |
| Skip Record | If the referenced User record is missing or is an inactive Salesforce User then do not restore the record.                                                            |


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://learn.capstorm.com/copystorm-restore/reference/restore-set-editor-tab/reference-fields-restore-editor.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
