Relationship Considerations for Salesforce Connect—All Adapters | Salesforce
Relationship Considerations for Salesforce Connect—All Adapters
Lookup, external lookup, and indirect lookup relationships have some special behaviors and limitations.
Available in: both Salesforce Classic and Lightning Experience
Available in: Developer Edition
Available for an extra cost in: Enterprise, Performance, and Unlimited Editions
Only lookup, external lookup, and indirect lookup relationships are available for external objects. No other relationship types are supported.
Depending on the availability of the external system, related lists of child external objects may load slowly when users view the parent record detail pages.
Relationships that involve external objects allow users to create child records from the record detail pages of parent records. However, the relationship field on each new child record isn’t automatically populated to identify the parent record.
Syncing doesn’t create relationship fields on the external objects in your Salesforce org. However, you can change the field type of a sync-created custom field to Lookup Relationship, External Lookup Relationship, or Indirect Lookup Relationship. Changing the field type of an existing custom field is simpler and more efficient than manually creating a relationship field on the external object.
For example, suppose that the external system has a foreign key relationship. Syncing the related tables creates a text field in your org for the external column that identifies the foreign keys. To reflect the foreign key relationship within your org, change the field type of that text field to External Lookup Relationship.
A relationship field is a type of custom field. Therefore, like all custom fields on an external object, relationship fields can be overwritten when you sync the external object. See the sync considerations for each Salesforce Connect adapter that you use.
Cascade-delete isn’t available for external object relationships.
In Salesforce Classic only, external lookup and indirect lookup relationship fields don’t display the expected names of parent records.
An external lookup field displays either the parent object ID or the value of the parent object's External ID standard field. The latter appears by default. If, however, a custom field on the parent object has the Is Name Field attribute, the parent object ID is displayed.
An indirect lookup field displays the value of the target field on the parent object. To find related records, target field values are matched against the values of the indirect lookup relationship field on the child object. The target field, which has the External ID and Unique attributes, is selected when an indirect lookup field is created.
When a user tries to edit an external lookup or indirect lookup relationship field, a lookup dialog isn’t available for selecting the parent record.
To edit an external lookup relationship field, manually enter the value of the External ID standard field for the parent record.
To edit an indirect lookup relationship field, manually enter the value of the target field of the parent record. The target field is the custom field with External ID and Unique attributes that was selected when the indirect lookup relationship was created. To determine related records, Salesforce matches target field values against the values of the indirect lookup relationship field on the child object.
With external lookup and indirect lookup relationships, the parent record appears as a clickable link in the relationship field on the child record. If the child record is viewed by a user who doesn’t have access to the parent record, the parent record appears in the relationship field as plain text instead of a link.
Lookup filters aren’t available for external lookup relationship fields.
Indirect lookup relationship fields can be created on external objects only.
Only objects that have a custom field with the External ID and Unique attributes are available as parent objects in indirect lookup relationships.If you don't see the desired object when you create an indirect lookup relationship field, add a custom unique, external ID field to that object.
If the external system uses case-sensitive values in the specified External Column Name, make sure that the parent object field is also case-sensitive. When you define the parent object’s custom field, select External ID, Unique, and Treat "ABC" and "abc" as different values (case sensitive).