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) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Getting Smart Group ID's by contact id
Pages: [1]

Author Topic: Getting Smart Group ID's by contact id  (Read 777 times)

nrporter

  • Guest
Getting Smart Group ID's by contact id
December 07, 2009, 12:47:27 pm
Currently in the project I am working on to integrate an outside system with civi, I need to get the smart groups that an individual is a member of. I am currently using the built in function to retrieve the groups that a contact is a member of aka CRM_Contact_BAO_GroupContact::getContactGroup( $objectId, "Added") . The problem generated with this is that for all Smart groups, I'm simply getting group id 113 which is of course not the desired ID. Is there a better way to get ALL of the groups? Thanks for the help.

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Getting Smart Group ID's by contact id
December 07, 2009, 09:37:54 pm
You should check: http://wiki.civicrm.org/confluence/display/CRMDOC/Group+APIs

Kurund
Found this reply helpful? Support CiviCRM

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Getting Smart Group ID's by contact id

This forum was archived on 2017-11-26.