Prior to this release, when you used the web app to map a lookup field into the data model for a Salesforce team, the UI automatically created a corresponding HasMany field on the related object; however, it used the name of the parent object as the name of the field.
For example, when creating a lookup field from Invoices to Jobs:
- The administrator would create a Lookup field to Jobs named "Job" on the Invoices object.
- The system would create a HasMany field on the Jobs object with name "Job".
The name of the HasMany field does not reflect the relationship; since the Job can have many Invoices, rather than many Jobs. Also, this bug meant that if you created a Lookup field to Jobs on another object, the system would attempt to create a second Lookup field called "Job", resulting in a naming conflict and an error.
Updated behavior:
With this fix, the HasMany field is named according to the "Child Relationship Name" property defined in Salesforce.
For example, when creating a lookup field from Invoices to Jobs:
- The administrator creates a Lookup field named "Job" on the Invoices object.
- The system creates a HasMany field on the Jobs object with name "RelatedInvoices" and label "Related Invoices". These values are sourced from the Child Relationship Name property defined on the lookup field in Salesforce (which, in this example, is "RelatedInvoices").
This ensures that the generated field names are both meaningful and consistent with Salesforce standards.