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 Profiles (Moderator: Dave Greenberg) »
  • Only showing organisations in Contact Reference.
Pages: [1]

Author Topic: Only showing organisations in Contact Reference.  (Read 800 times)

Yoda_Oz

  • I post occasionally
  • **
  • Posts: 107
  • Karma: 2
  • CiviCRM version: 3.3.3
  • CMS version: Joomla 1.5.22
Only showing organisations in Contact Reference.
June 23, 2010, 05:34:28 am
how do i make a custom data field of a contact reference to only show organisations?

also, how do i then make a relationship to this organisation by the person filling in the form. organisation is basically the employer of the person filling in the form.
« Last Edit: June 23, 2010, 05:37:45 am by Yoda_Oz »

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: Only showing organisations in Contact Reference.
June 25, 2010, 06:05:55 am
Quote
how do i make a custom data field of a contact reference to only show organisations?

This can be done using contactListQuery hook, check http://wiki.civicrm.org/confluence/display/CRMUPCOMING/CiviCRM+hook+specification#CiviCRMhookspecification-hookcivicrmcontactListQuery

Quote
how do i then make a relationship to this organisation by the person filling in the form. organisation is basically the employer of the person filling in the form.
You can use postProcess hook and write code to create relationship. Hook example can be found here http://wiki.civicrm.org/confluence/display/CRMUPCOMING/CiviCRM+hook+specification#CiviCRMhookspecification-hookcivicrmpostProcess

HTh
Kurund
Found this reply helpful? Support CiviCRM

Yoda_Oz

  • I post occasionally
  • **
  • Posts: 107
  • Karma: 2
  • CiviCRM version: 3.3.3
  • CMS version: Joomla 1.5.22
Re: Only showing organisations in Contact Reference.
June 25, 2010, 06:07:10 am
thanks :)

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Only showing organisations in Contact Reference.
June 29, 2010, 02:52:03 am
Might see an alternate approach:
http://civicrm.org/blogs/xavier/how-customise-contact-reference-custom-field

And a discussion on the pros and cons of this approach.

Why don't you use current employer ? it basically seems to do what you describes already.

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Yoda_Oz

  • I post occasionally
  • **
  • Posts: 107
  • Karma: 2
  • CiviCRM version: 3.3.3
  • CMS version: Joomla 1.5.22
Re: Only showing organisations in Contact Reference.
June 29, 2010, 02:58:31 am
thanks. im currently trying the current employer option but to no avail as you know from another forum topic:
http://forum.civicrm.org/index.php/topic,14329.0.html

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Profiles (Moderator: Dave Greenberg) »
  • Only showing organisations in Contact Reference.

This forum was archived on 2017-11-26.