I have an organisation with members across many institutions around Australia and each institution will have one of those members as a contact for that institution.
On each institution's landing page on my site, I want to display a 'contact me' link for the designated contact person for that institution.
The data for both the institution and individual are held in CiviCRM, although the individual contacts are users in Drupal as well.
The way I have structured the data is to have the institution contact person be a custom contact reference field in CiviCRM that is attached to the Organisation contact type.
On my institution landing pages, created with a Drupal view, I can display the organisation data from Civi, including the institution contact person, and, using a CiviCRM relationship (B to A), list the members who are at that institution.
However, what I cannot figure out is how to link the institution contact person to their Drupal ID, so as to be able to rewrite the output of that field and link their name to a Drupal contact form.
I can link the list of members to Drupal ID's because they are Contact A of the CiviCRM relationship, but the institution contact person (who is also in the list of members, of course) is a field of Contact B, which does not have a Drupal ID.
[EDIT] A more concise way to describe the problem. I have a view based on the relationship between an organisation and its members. One field of the organisation is a contact reference.
I want to:
Display fields from the organisation
Display a list of members of the organisation
Link the contact reference field of the organisation to its Drupal user
I have managed 1. and 2.
I presume that the question related to 3. above is how do I access the full contact record (including Drupal ID) of the contact in the contact reference field when the view is based on a different CiviCRM contact, namely the organisation?[\EDIT]
Questions:
Is there a way to solve Point 3 above with relationships and filters in views the way I have the data structured, and, if so, how?
Is there a better way to structure the data, and, if so, how? For example, would it be better to create a CiviCRM relationship to define the contact person, e.g. "Contact person for"/"Our contact person", and then try to set up multiple relationships with the institution in Views to get the links right?
If 2, then some advice as to how to proceed with relationships would also be appreciated.
Thanks, Lewis