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) »
  • No target_contact_id in CRM_Activity_DAO_Activity, is that right?
Pages: [1]

Author Topic: No target_contact_id in CRM_Activity_DAO_Activity, is that right?  (Read 483 times)

KarinG

  • I post frequently
  • ***
  • Posts: 134
  • Karma: 9
  • CiviCRM version: 4+
  • CMS version: Drupal 6 / 7
  • MySQL version: MariaDB
  • PHP version: 5.3/5.4/5.5
No target_contact_id in CRM_Activity_DAO_Activity, is that right?
September 28, 2013, 07:02:46 pm
I'm creating a civicrm_post() hook to automatically create a couple more future Activities when an Activity of a certain type_id is Created. Hook is working fine - and I've got the date math worked out - but I can't find the target_contact_id in the objectRef so I'm scheduling an Activity with "n/a" ;). Do I need to use the activity_id to look up the target_contact_id in the civicrm_activity_target table? Or am I missing something obvious?

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: No target_contact_id in CRM_Activity_DAO_Activity, is that right?
September 28, 2013, 07:04:25 pm
Yes, you need to look it up there ... AND ... if there is any chance of an upgrade in the near future to 4.4 which is on the brink of coming out I would wait & do that work on 4.4 as it will be very difficult to write it in a way that will work on both 4.3 & 4.4
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

KarinG

  • I post frequently
  • ***
  • Posts: 134
  • Karma: 9
  • CiviCRM version: 4+
  • CMS version: Drupal 6 / 7
  • MySQL version: MariaDB
  • PHP version: 5.3/5.4/5.5
Re: No target_contact_id in CRM_Activity_DAO_Activity, is that right?
September 28, 2013, 07:05:56 pm
Thank you - and thanks for the heads up!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • No target_contact_id in CRM_Activity_DAO_Activity, is that right?

This forum was archived on 2017-11-26.