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) »
  • Field 'entity_id' in custom data file
Pages: [1]

Author Topic: Field 'entity_id' in custom data file  (Read 1355 times)

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
Field 'entity_id' in custom data file
April 21, 2009, 06:41:14 am
I have created a custom group, and within that group a number of fields. These fields will be populated from a transaction system, and only viewed in CiviCRM. So I populate the fields with a script as there is no API.
In the file I have created is a field called 'entity_id' and it gets a value when I enter data in CiviCRM directly. I would leave this with a default value in my script, but is it required anywhere and what is in it when I enter data in CiviCRM?

Erik
Consultant/project manager at EEatWork and CiviCooP (http://www.civicoop.org/)

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: Field 'entity_id' in custom data file
April 21, 2009, 07:51:30 am

yes, it is required and is quite important :)

it is basically the Foreign Key (FK) to the civicrm table that this custom group extends

so if the custom group extends a contact (or individual / household / org) entity_id is the contact_id and that row holds the values for that specific contact_id

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

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: Field 'entity_id' in custom data file
April 21, 2009, 07:53:25 am
I see! I know what to do now  :)
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) »
  • Field 'entity_id' in custom data file

This forum was archived on 2017-11-26.