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) »
  • Possible bug, or I'm doing something wrong
Pages: [1]

Author Topic: Possible bug, or I'm doing something wrong  (Read 871 times)

trevorwood

  • I post occasionally
  • **
  • Posts: 119
  • Karma: 4
  • CiviCRM version: 4.0.2
  • CMS version: Joomla 1.6
  • MySQL version: 5.0.51a
  • PHP version: 5.2.6-1+lenny8
Possible bug, or I'm doing something wrong
August 26, 2011, 06:34:29 am
I'm trying to retrieve all the people who are employed by an organisation

Code is this

$params = array(
   'contact_type' => 'Individual',
   'current_employer' => $display_name,
   'version' => 3,
);

where $display_name is the name of the employing company.

I'm getting all the employees returned but I'm also getting everyone who isn't linked to an Organisation, so the [current_employer] field isn't set. If I dump the returned results (using print_r) the [current_employer] field doesn't appear.

Not quite what I was expecting.

Can someone help please

Thanks

trevorwood

  • I post occasionally
  • **
  • Posts: 119
  • Karma: 4
  • CiviCRM version: 4.0.2
  • CMS version: Joomla 1.6
  • MySQL version: 5.0.51a
  • PHP version: 5.2.6-1+lenny8
Re: Possible bug, or I'm doing something wrong
August 26, 2011, 07:05:12 am
OK - panic over, I was doing something wrong.

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Possible bug, or I'm doing something wrong
August 26, 2011, 07:09:42 am
Hi,

Could you detail how you solved it?

X+

P.S. and ideally write a unit test that guaranties it will work in the future too
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

trevorwood

  • I post occasionally
  • **
  • Posts: 119
  • Karma: 4
  • CiviCRM version: 4.0.2
  • CMS version: Joomla 1.6
  • MySQL version: 5.0.51a
  • PHP version: 5.2.6-1+lenny8
Re: Possible bug, or I'm doing something wrong
September 01, 2011, 03:12:36 am
It was a problem with the code I was writing, nothing to do with CiviCRM in the end

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • Possible bug, or I'm doing something wrong

This forum was archived on 2017-11-26.