External lookup versus indirect lookup relationships
Key Takeaway
Start with the parent. If it's an external object, use an external lookup. If it's a standard or custom object and the external child data has no Salesforce record IDs, use an indirect lookup. An indirect lookup matches a custom unique External ID field on the parent, and users type that field's value to set the parent.
External objects let Salesforce show data that's stored in another system. That data often doesn't include the Salesforce record IDs that a Lookup relationship uses to link records. Two special relationship types solve this by matching other key values instead. An external lookup uses an external object as the parent. An indirect lookup links a child external object to a parent standard or custom object. Picking the right one decides which parent field Salesforce matches and which value users type to link a child record to its parent.
Three relationship types
Only three relationship types are available for external objects: Lookup, external lookup, and indirect lookup. No other relationship types are supported.
All three link records the same basic way. Salesforce compares the values of a specific field on the parent with the values of the relationship field on the child. Records with matching values are related. The types differ in which objects can be the parent or the child, and in which parent field is matched.
| Lookup | External lookup | Indirect lookup | |
|---|---|---|---|
| Parent object | Standard or custom object | External object | Standard or custom object |
| Child object | Standard, custom, or external object | Standard, custom, or external object | External object only |
| Parent field matched | 18-character Salesforce record ID | External ID standard field | A custom field you select |