Custom fields with duplicate labels are not displayed correctly in views
Steps to recreate:
- Create a custom field group associated with organisations, add a field with the label 'Role' (eg: ID 1)
- Create a custom field group associated with individuals, add a field with the label 'Role' (eg: ID 2)
- Create a view which exposes the second 'role' field on a contact record
- The field is always empty
Reason:
- The custom field handler is searching for the field ID based on the label of the field, which is a loose search
Remedy:
- Tighten the custom field handler to search for the ID of the field based on the unique column name