CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • primary_contact_id field in civicrm_contact table?
Pages: [1]

Author Topic: primary_contact_id field in civicrm_contact table?  (Read 833 times)

DerekL

  • I post frequently
  • ***
  • Posts: 132
  • Karma: 1
  • CiviCRM version: 4.5.5
  • CMS version: Drupal 7.34
  • MySQL version: 5.1.54
  • PHP version: 5.2.17
primary_contact_id field in civicrm_contact table?
January 30, 2012, 03:45:31 pm
This field is exactly what I need to link a contact of type organization to a contact of type individual for typical "primary contact" operations.

Since its already here....Am I missing something as far as getting some use out of this field?

I'm looking for a way to pull a listing of member organizations, then identify and relate a primary contact  to each for a listing on a front end page.

The way I'm "half" doing it now is by creating a group called "is primary member" and then running a sloppy amount of queries to get the info I need, even then though, its a messy, sloppy fix.

Any ideas?

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: primary_contact_id field in civicrm_contact table?
January 30, 2012, 04:45:43 pm

That field is currently not being used. I suspect it will disappear in a future version, so might not want to use it. I think "primary" contacts might need to be in a join table rather than one field.

If you are willing to build "functionality" around the primary contact concept for core, that would be great. Ping us on IRC and we can help you spec it out etc

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • primary_contact_id field in civicrm_contact table?

This forum was archived on 2017-11-26.