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 »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • Relationship API
Pages: [1]

Author Topic: Relationship API  (Read 505 times)

aspagarino

  • I post occasionally
  • **
  • Posts: 89
  • Karma: 10
  • San Diego Joomla
    • California Center for Sustainable Energy
  • CiviCRM version: CiviCRM 4.3
  • CMS version: Drupal 7
Relationship API
February 16, 2012, 03:05:36 pm
I am trying to modify a relationship report and use getContactRelationshipType to only display an array for one relationship (id = 15).

Not sure how to use this API for only this particular id... I tried

                                      CRM_Contact_BAO_Relationship::getContactRelationshipType( null, 'null', 15, null, true)
Andres

Open Source is Green

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Relationship API
February 16, 2012, 03:22:58 pm
civicrm_api('relationship_type', 'getsingle', array('version' => 3, 'id' => 15));

OR

civicrm_api('relationship_type', 'get', array('version' => 3, 'id' => 15));


(getsingle is like get but changes the return format a bit )
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • Relationship API

This forum was archived on 2017-11-26.