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 (Moderator: Dave Greenberg) »
  • Relationships and Contact Reference Custom Data Field
Pages: [1]

Author Topic: Relationships and Contact Reference Custom Data Field  (Read 5280 times)

libkuman

  • I’m new here
  • *
  • Posts: 11
  • Karma: 0
Relationships and Contact Reference Custom Data Field
August 23, 2013, 04:29:22 pm
I'm using the Contact Reference custom data field for  the first time and really excited about it. However, what I'd really like is when the Contact Reference is saved it also would create a Relationship.

I saw reference to this here: http://civicrm.org/comment/5977#comment-5977 but have not seen any other action on it.

So I am trying to see if anybody has made any movement on this, or if i should just create my own module and implement a hook to create a relationship within my own code. Would there be a better approach if we roll our own solution?

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: Relationships and Contact Reference Custom Data Field
August 23, 2013, 05:18:19 pm
Yes there are ways of doing this. If you are using Drupal Webform-CiviCRM integration (and you should!), then it can happen for you automatically.
Otherwise you could do it pretty easily (depending on your skill level) by coding up a custom hook.
HOWEVER...
I do want to point out that your request raises a big red flag: storing the same data in 2 places is almost always very bad, and it's usually a decision you will come to regret. Unless you have a really stellar reason for storing this in formation as both a custom field and a relationship, I would advise against it.
Try asking your question on the new CiviCRM help site.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM (Moderator: Dave Greenberg) »
  • Relationships and Contact Reference Custom Data Field

This forum was archived on 2017-11-26.