This documentation relates to CiviCRM version 3.2. It's not maintained anymore.
Current version of documentation.

Views2 Integration Module

Comparaison des versions


  • Ces lignes ont été ajoutées. Ce mot a été ajouté.
  • Ces lignes ont été supprimées. Ce mot a été supprimé.
  • Formatting was changed.
Commentaire: Migrated to Confluence 4.0

Some tips and tricks for integrating Views2 and CiviCRM

  • If your CiviCRM install uses a different database to your Drupal install, ensure that your Drupal DB user has SELECT rights to your CiviCRM DB. Some hosting platforms might make this difficult. For more information about setting up Drupal multi-database access:
  • You will need to set database prefixes in your Drupal settings.php file so that Views2 can access your CiviCRM DB. The prefixes can be seen on a url like: You will need to have Views2 enabled to see those settings. Important: You will have to update your settings.php with new prefixes every time you add new Custom Field Group.  Also, after making changes in civicrm you should clear Drupal's view cache at:  Administer › Site building › Views › Tools and press "Clear Views cache".
  • If you have CiviCRM and Drupal installed on the same database, and drupal tables are prefixed, you might receive an error in your views saying table does not exist, if this happens, you need to alter your drupal sites/default/settings.php file.  find the part that says $db_prefix = 'drupal_'; and change it to this: $db_prefix = array ('default'=>'drupal_','civicrm_event'=>'','civicrm_activity'=>'','civicrm_contact'=>'','civicrm_address'=>'','civicrm_contribution'=>'');  NOTE: your prefix may be something other then drupal_, just replace drupal_ with whatever prefix you have configured.
  • If the above steps dont work for you or your drupal/civicrm db's have a different user name/password, try this recipe from andrew: CiviCRM Views 2 integration with a remote CiviCRM database
  • A diagram from the work done by James Rakich

Diagram for civicrm_relationship table:

Creative Commons License
Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-Share Alike 3.0 United States Licence.