discoverRelationshipFields
discoverRelationshipFields(
connection,fields):Promise<string[]>
Defined in: relationshipFields.ts:58
Given an SObject’s describe fields, discover the identifying fields of every parent it
references through a single-target lookup or master-detail relationship, and return them as
dot-notation relationship paths ready to add to a SOQL field list (e.g. RecordTypeId ->
RecordType.Name, RecordType.DeveloperName).
Describe calls for each distinct target object are deduplicated and fetched concurrently;
Connection#describe already memoizes per-instance, so repeat calls for the same object name
(including calls made elsewhere on the same connection) are cheap.
Parameters
Section titled “Parameters”connection
Section titled “connection”Connection
The org connection to describe relationship targets with.
fields
Section titled “fields”Field[]
The describe fields of the SObject being backed up.
Returns
Section titled “Returns”Promise<string[]>
Dot-notation relationship field paths, in no particular order.