External lookup versus indirect lookup
Key Takeaway
The key difference is direction. An external lookup points to a parent that is an external object, while an indirect lookup links a child external object to a parent standard or custom object.
External objects show data that is stored outside Salesforce. Because external data often doesn't contain 18-character Salesforce record IDs, a standard lookup can't link it. External lookups and indirect lookups solve this problem by matching field values instead of record IDs.
How external lookups and indirect lookups match records
A standard lookup relates records by the 18-character Salesforce record ID. External lookups and indirect lookups instead compare a specific field's values on the parent object to the relationship field's values on the child object. Records whose values match are related.
| External lookup | Indirect lookup | |
|---|---|---|
| Parent | An external object | A standard or custom object |
| Child | A standard, custom, or external object | An external object |
| Field matched on the parent | The External ID standard field | A custom field you select that has the External ID and Unique attributes (the parent's target field) |
| Field matched on the child | The external lookup field | The indirect lookup field |
You can create indirect lookup fields on external objects only, so an external lookup is more flexible on the child side.
When the child is an external object, the values in its external lookup or indirect lookup field come from the column named in the field's "External Column Name".
For example, imagine an external product catalog item as the parent external object. With an external lookup, a catalog item can show a related list of support cases, which are the child standard object.
For example, imagine a custom Store object and a child external object that holds deliveries from a shipping system. Each delivery identifies its store by a store code, not by a Salesforce record ID. You give Store a custom field that has the External ID and Unique attributes and holds the store code. With an indirect lookup, a Store record can then show a related list of the deliveries that match on that code.