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 get api function
Pages: [1]

Author Topic: Relationship get api function  (Read 806 times)

kmitz

  • I post occasionally
  • **
  • Posts: 74
  • Karma: 2
Relationship get api function
August 24, 2011, 09:35:42 am
Hi,

I'm implementing the $relationship->delete method via the api3 interface:

Code: [Select]
$result = civicrm_api("Relationship","delete", $params);

The 2 params required (afaik) are 'version' and 'id'.  What's the preferred method for obtaining the specific id?

(Right now I do a $relationship->get and loop through all of the results to filter for the specific id that I need to find.  If the get function would accept 'relationship_type_id', 'contact_id_a' and 'contact_id_b', it would be easy, but it seems to ignore these params).

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Relationship get api function
August 24, 2011, 02:40:36 pm
http://issues.civicrm.org/jira/browse/CRM-8721

Try grabbing the latest from SVN
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

kmitz

  • I post occasionally
  • **
  • Posts: 74
  • Karma: 2
Re: Relationship get api function
August 25, 2011, 07:58:23 am
Wow.  Thanks.

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

This forum was archived on 2017-11-26.