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) »
  • civicrm_contact_get 25-contact limit?
Pages: [1]

Author Topic: civicrm_contact_get 25-contact limit?  (Read 1636 times)

jkounis

  • I’m new here
  • *
  • Posts: 14
  • Karma: 0
  • CiviCRM version: 3.3.2
  • CMS version: Drupal 6.20
  • MySQL version: 5.1
  • PHP version: 5.3
civicrm_contact_get 25-contact limit?
March 18, 2012, 03:56:13 pm
I have been using civicrm_contact_get to retrieve contacts, and I recently ran into a 25-contact limit in the API call. I tracked it down to line 363 in civicrm/api/v2/Contact.php:
Code: [Select]
    $rowCount        = 25;

I cannot find any way to increase the rowCount in civicrm_contact_get. I'm using civicrm v3.3 / api v2. Is there any way with this API to retrieve more than 25 contacts?

When I upgrade to civicrm v3.4 / api v3, will I run into the same 25-contact limit?

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: civicrm_contact_get 25-contact limit?
March 18, 2012, 08:35:35 pm
Pretty sure you can over-ride the rowCount in v3 by including rowCount in params array.
Protect your investment in CiviCRM by  becoming a Member!

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: civicrm_contact_get 25-contact limit?
March 19, 2012, 02:12:17 am
Please do not use civicrm_contact_get or any api v2, that's been obsoleted for more than a year and will be removed from the next major version.

call civicrm_api ('contact','get' instead

More info over there (but that's mostly the same) and rowCount=x allows you to fetch more than 25. I'd suggest you to set the return param as well to define exactly what you want, and use the api explorer (on /civicrm/api/explorer on your install) to experiment.

http://wiki.civicrm.org/confluence/display/CRMDOC41/CiviCRM+Public+APIs
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: civicrm_contact_get 25-contact limit?
March 19, 2012, 12:52:02 pm
Just to be really clear - api calls shouldn't work without the civicrm_api()wrapper!
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) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • civicrm_contact_get 25-contact limit?

This forum was archived on 2017-11-26.