In Salesforce, objects are related to each other with the following relationships:
- Indirect lookup
- External lookup
For detailed information about object relationships, see Object Relationships Overview.
When users create records with these object relationships, the records may contain:
- Blank lookup values, also known as orphan records,
- Contain a reference to other child and parent records,
- Include fields that reference other records on the same object.
Within a Data Template, you can select records and the application automatically discovers the related parent and child records.
Child Record Levels
The section describes how selecting child records during Data Template creation works for the following example.
For example, a Project includes Project Team Members and a set of Deliverables. Each Project Team Member is a Team Member, who has Resources. Each Team Member also has a Physical Location. In this scenario, the following objects are related to each other:
- Project Team Members
- Physical Location
The following relationship diagram illustrates the object relationships.
The meaning of relationship levels for a Project record is as follows:
|3 Level||Includes the related records from all of the objects shown.|
|All Child Objects||Includes the related records from all of the objects shown.|
|Custom||Includes your custom selection of the related records to include. Use the above definitions to define your selection.|
Note: The selection of a child record always includes the parent records as a child record cannot exist without the parent (i.e. orphan records).
Extract, Transform, and Load Process Overview
Data copies are created using an extract, transform, and load (ETL) procedure. The following sections explain each stage in the ETL process.
This stage extracts records from the source specified in the data template. When determining the fields to query, the application only considers fields, which exist on both the source and destination and are accessible by the user through field permissions.
The application considers the query result from the extraction stage and applies transform procedures in the following order:
- Data Translation
- Data Mask
Note: If a data translation and data mask operation are set for the same object field, the data mask operation occurs on the translated value.
This is the final stage, which copies the records to the destination org.
The application determines if the record(s) should be updated or created based on the external ID settings. For more information, see External ID.
If the records lock other records during a data copy, the application keeps a track of the locked records and automatically performs sequencing for loading of the records. The application considers the following types of record locking:
|Master-Detail Relationships||The application tracks the locked master records and performs the insertion in sequence accordingly.|
The application tracks the locked lookup records and performs the insertion in sequence accordingly.If the lookup field is set to Don't allow deletion of the lookup record that's part of a lookup relationship setting in Salesforce, the lookup records are locked.
|Roll-up Summary Fields||The application tracks locked master records and performs the insertion in sequence accordingly.|
|Triggers||The application disables triggers by default during a data copy.|
|Workflow Rules||The application disables workflows by default during a data copy.|
|Group Membership Locks||
The application does not consider group membership locks during a data copy.
For more information, see Group Membership Locks.
For more information on record locking, see Salesforce Record Locking.