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) »
  • Accessing CiviCRMs custom data fields from within Drupal
Pages: [1]

Author Topic: Accessing CiviCRMs custom data fields from within Drupal  (Read 1501 times)

boxfresh_1979

  • Guest
Accessing CiviCRMs custom data fields from within Drupal
August 05, 2008, 09:26:41 am
Hello,

I have created some custom data fields in CiviCRM and included them in a profile on a contribution page. I then have a custom Drupal module that implements the really useful civicrm hook soapclient_civicrm_post allowing me to access CiviCRM objects.

I'm using the CRM_Contact_BAO_Contact::contactDetails function to load a contacts details and its working really well.  Where I'm having problems is accessing the custom data fields attached to this user.

I've looked at using functions in the CRM_Core_BAO_CustomField class but these all seem to be based around the management of fields and not accessing the values within them.

Has anyone tried this or have any pointers?

Many thanks

Rich


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: Accessing CiviCRMs custom data fields from within Drupal
August 05, 2008, 12:57:30 pm
check: CRM/Core/BAO/CustomValueTable.php, function getEntityValues

should get all the custom fields for a given entity id / entity type
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) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Accessing CiviCRMs custom data fields from within Drupal

This forum was archived on 2017-11-26.