Problem/Motivation
It is helpful to understand which address, phone, and email are a contact's primary, but the existing "addresses", "phones" and "emails" Entity Reference fields on the Contact entity do not denote which referenced entity is the primary for each.
Steps to reproduce
Proposed resolution
Option A
- Adopt convention that the first referenced entity (delta 0) is the primary
- Improve Inline Entity Form UX for these fields to make clear that the first is the primary and adapts when the primary is changed (e.g. via drag and drop)
- Add a "Make primary" button to the Inline Entity Form table for each row (except the first) that brings the given referenced entity to the top of the list
Option B
- Improve as needed Primary Entity Reference, (which explicitly stores a primary bit with each reference) to ensure that Views, ECA, Search API, Token, etc. be able to navigate the reference as they do vanilla Entity Reference fields
- Replace the existing "addresses", "phones" and "emails" Entity Reference fields with Primary Entity Reference fields
Remaining tasks
User interface changes
API changes
Data model changes
Issue fork crm-3525356
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
jdleonardComment #3
jdleonardPer discussion with @bluegeek9, I begrudgingly accept Option B. Primary Entity Reference needs some more eyeballs and tests and we need to adopt it for CRM.
Comment #4
jdleonardComment #6
bluegeek9 commentedComment #9
bluegeek9 commented