I'm fairly new to debugging Drupal and even more so to debugging CiviCRM issues, so bear with me..I'm a newbie.

I need to be able to create views that pull a variety of CiviCRM fields so that I can theme them. But I can't get the custom fields to pull correctly. The closest I could find on this issue was this post: http://drupal.org/node/194493

I checked the bug reports for the CiviNode and CiviNode CCK projects but didn't see anything related to this issue. I've also tried lots of searching here and on civicrm.org with no luck.

So here's what happens. I've created a new view and am selecting "CiviCRM Contact" as the field to pull. For the handler I choose "contact field" and put the name of the field in the option box. This works great for native civicrm fields, but not for custom ones.

I've tried using the text name of the custom field, the id (Formatting it the following way "custom_ID#"), and just the ID#....no luck.

What happens is the civicrm ID number of the individual shows up for where the custom field data should be, as well as for those instances with the native civicrm fields (first_name, middle_name, etc.) when the data is null. For the custom data fields I'm trying to pull...I know that the data I'm listing is not null, so something should be there other than the civicrm ID #.

Hopefully, I'm just missing some easy step somewhere...I'm a far cry from being a developer, but depending on how technical this gets...I'd be happy to help write some documentation on how to pull individual civicrm fields into Drupal.

Thanks in advance.

Cheers,
Kristin

PS...this is my first bug report, I labeled it as critical since I figure integrating civicrm data into nodes and cck is the key purpose of the module...I read the guides to posting bugs and am making the best judgment I can...let me know if I should have categorized it differently.

Comments

gtothab’s picture

I need to do the same thing!

The help is appreciated :)

gtothab’s picture

The fields appear fine in a drupal 6 install. Try upgrading to d6

kcaulfield’s picture

From stuff that I read on the module, it was implied that you could do it in 5 too. I have plans to upgrade to D6...just not yet...so I was hoping I was just missing something and could still do it in 5. Thanks for confirming that it works in 6 though....I'll get there eventually.

:0D

gtothab’s picture

gl

OnthegOinOz’s picture

(in Drupal 6) I might be asking the obvious but how do I get civicrm fields associated with an individual to appear in the drupal profile page. I am trying to do this via creating a specific view but I get the following error:

user warning: Table 'visionar_drupal.civicrm_contact' doesn't exist query: SELECT civicrm_contact.id AS id, civicrm_value_business_information_1.business_name_7 AS civicrm_value_business_information_1_business_name_7 FROM civicrm_contact civicrm_contact LEFT JOIN civicrm_value_business_information_1 civicrm_value_business_information_1 ON civicrm_contact.id = civicrm_value_business_information_1.entity_id LIMIT 0, 10 in /home/visionar/public_html/MYSITE/modules/views/includes/view.inc on line 755.

I have set a view to have a content pane with field 'business_name' which in defined as a field created in CiviCRM. I have also created the relationship with Drupal ID so it links the business name with the user in question.

Can you please tell me where I have gone a miss?

thanks

evelien’s picture

OnthegOinOz’s picture

yep, I did... found my way with some help from folk at CiviCRM.

Thats the links

OnthegOinOz’s picture

Status: Active » Closed (fixed)