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) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Custom data set
Pages: [1]

Author Topic: Custom data set  (Read 710 times)

sdk900

  • Guest
Custom data set
September 21, 2010, 12:23:34 am
Hi all,

I've hit a road block with adding custom data. I would like ideally to add custom tables with foreign key constraints. I have created some tables with civi's custom data system and realise that I can set the data with hooks(though have yet to actually do this)

What I have noticed is that the custom table fields include an 'entity id' which as far as I can tell relates to the system that set the field(via a hook or profile, etc). Can I set the table data with hooks without an 'entity id'?

Thanks.


Erik Hommel

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1773
  • Karma: 59
    • EE-atWork
  • CiviCRM version: all sorts
  • CMS version: Drupal
  • MySQL version: Ubuntu's latest LTS version
  • PHP version: Ubuntu's latest LTS version
Re: Custom data set
September 21, 2010, 12:41:05 am
The entity id refers to the ID of the entity you linked your custom group to, and is required. So if I create custom fields linked to Contacts, the entity ID will hold the contact_id. I would not set the data without entity id!
Consultant/project manager at EEatWork and CiviCooP (http://www.civicoop.org/)

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Custom data set

This forum was archived on 2017-11-26.