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 (Moderator: Donald Lobo) »
  • Ability to provide callback when creating an activity with civicrm_activity_crea
Pages: [1]

Author Topic: Ability to provide callback when creating an activity with civicrm_activity_crea  (Read 1646 times)

taram

  • I post occasionally
  • **
  • Posts: 35
  • Karma: 2
Ability to provide callback when creating an activity with civicrm_activity_crea
February 11, 2009, 02:03:06 pm
Hello,
In 1.5.4 when creating the activity history (crm_create_activity_history), one parameter can be a callback function. Since this api is deprecated in 2.0 we are using civicrm_activity_create which doesn't have this capability. Is there a workaround for this or should I modify the actionlinks api in Activity.php to reset the url depending on activity type?
Thanks.

Michał Mach

  • Ask me questions
  • ****
  • Posts: 748
  • Karma: 59
    • CiviCRM site
  • CiviCRM version: latest
  • CMS version: Drupal and Joomla latest
  • MySQL version: numerous
  • PHP version: 5.3 and 5.2
Re: Ability to provide callback when creating an activity with civicrm_activity_crea
February 13, 2009, 03:07:23 am
Hey,

I don't think there is a possibility at the moment to define callback function for activity.

However, could you describe your use case? Knowing what you need could be very helpful in providing some built in mechanism for extending/customising activities.

Thx,
m
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

My absolute favourite: Wordpress Integration!.

Donate Now!

taram

  • I post occasionally
  • **
  • Posts: 35
  • Karma: 2
Re: Ability to provide callback when creating an activity with civicrm_activity_
February 13, 2009, 02:35:08 pm
Michal, when looking at transactions from the contact's activity tab and user clicks on the view link, instead of looking at activity details, we want the user to see the transaction invoice details. In 1.5.4 we were using the callback to direct the user to transaction invoice page.
Thanks.

Michał Mach

  • Ask me questions
  • ****
  • Posts: 748
  • Karma: 59
    • CiviCRM site
  • CiviCRM version: latest
  • CMS version: Drupal and Joomla latest
  • MySQL version: numerous
  • PHP version: 5.3 and 5.2
Re: Ability to provide callback when creating an activity with civicrm_activity_crea
February 13, 2009, 10:12:28 pm
Hey,

I took a look at Activity API surroundings and I'm thinking the preferred approach would be to have some kind of callback/handler defined based on activity type.

However, I'm pretty sure that providing it will not happen for 2.2 stable, I would rather see version 2.3 or later for this functionality to be introduced. In the meanwhile, you will need to introduce the hack you mentioned.

Thx,
m

Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

My absolute favourite: Wordpress Integration!.

Donate Now!

taram

  • I post occasionally
  • **
  • Posts: 35
  • Karma: 2
Re: Ability to provide callback when creating an activity with civicrm_activity_
February 17, 2009, 09:07:59 am
Thanks Michal. I will implement the hack.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Ability to provide callback when creating an activity with civicrm_activity_crea

This forum was archived on 2017-11-26.