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 (Moderator: Dave Greenberg) »
  • Activities/Details
Pages: [1]

Author Topic: Activities/Details  (Read 1299 times)

peteforsyth

  • I’m new here
  • *
  • Posts: 15
  • Karma: 0
    • Wikimedia Foundation
Activities/Details
May 24, 2010, 03:36:50 pm
I am setting up a new CiviCRM install for our organization. We have made extensive notes on our internal wiki.

I am trying to use the "Activities" feature to capture some, or all, of this information. But the "Details" field does not appear to permit any formatting (which is a problem for anything from bullet lists to headings to hyperlinks).

Alternately -- and probably more ideal -- I would like to simply link to our existing notes in the "Details" field. But when I paste in a URL, it does not hyperlink. A also tried using the HTML tag <a href=…, but that didn't work either.

Suggestions? Help?
Public Outreach Officer
Wikimedia Foundation

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Activities/Details
May 25, 2010, 05:56:56 pm
Hi Peter,
I think you bring up a good / valid use case, and the change to make the Details field support "rich text" including links is not too difficult. We're discussing it here and with some other folks in the community who currently use the Activities form heavily.

In the meantime you can try a different approach and see how that works for you:
- Create a custom field set which with "Used for" = Activities
- Add a Note field with HTML Type = Rich Text Editor - this will allow you to put in one or more links and other HTML formatted content

OR if you expect to only need one "link" per Activity, you can simply add a custom field with type = Link.
Protect your investment in CiviCRM by  becoming a Member!

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Activities/Details
May 26, 2010, 04:27:49 pm
The majority of folks responding were in favor of this change (including Phys Health and folks at Voluntary Action Westminster (VAW) who use activities heavily).

I've implemented it for 3.2:
http://issues.civicrm.org/jira/browse/CRM-6311

If the custom field approach above doesn't seem like a good solution, you can potentially backport this change to 3.1 (or wait for 3.2 - public alpha scheduled for next week will be pretty stable and you can start playing with it since I think you're working with a new "test" installation).
Protect your investment in CiviCRM by  becoming a Member!

peteforsyth

  • I’m new here
  • *
  • Posts: 15
  • Karma: 0
    • Wikimedia Foundation
Re: Activities/Details
May 27, 2010, 10:22:57 am
Dave,

Thanks for a very helpful response!

I'm hoping to talk with our tech folks soon to get a better sense, among other things, for how we will handle upgrades; I'll hold off on making a determination until then. Your message will be very helpful in that discussion!
Public Outreach Officer
Wikimedia Foundation

peteforsyth

  • I’m new here
  • *
  • Posts: 15
  • Karma: 0
    • Wikimedia Foundation
Re: Activities/Details
May 27, 2010, 11:20:37 am
Oh, one further thought: It would be very useful if the link to external notes were accessible from the summary list, under the "Activities" tab within the contact's record.
Public Outreach Officer
Wikimedia Foundation

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Activities/Details
May 27, 2010, 01:05:10 pm
Including the link in Activities listing seems to make sense only if these links are contained in a custom field specifically for that purpose (rather than embedded in the "Details" field which could potentially contain lots of text). In any case, modifying the listing table to include more / different columns would probably need to be done as a customization, OR as part of a larger project to allow admin configuration of listing table columns for various record types including activities.
Protect your investment in CiviCRM by  becoming a Member!

taram

  • I post occasionally
  • **
  • Posts: 35
  • Karma: 2
Re: Activities/Details
July 20, 2010, 12:38:33 pm
Dave, I created a custom group for storing the link field and set the 'Used For' to 'Activities'. I am trying to populate this link when I am creating my activity from the code and here's how my code looks:

Code: [Select]
$submission_url = "http://forum.civicrm.org";
civicrm_initialize();
  $params = array(
          'activity_name' => 'Program Special Application',
          'source_contact_id' => $org_id,
          'target_contact_id' => $org_id,
          'subject' => 'Program Special Application',
          'status_id' => 'Scheduled',
          'activity_date_time' => date('YmdHis'),
          'details' => ''   
          );
  require_once('CRM/Core/BAO/CustomField.php'); 
  $field = array('label' => 'Link');
  $defaults = array();
  $custom_field =& CRM_Core_BAO_CustomField::retrieve($field, $defaults);

  if ($custom_field->id) {
    $params['custom']['custom_field'.$custom_field->id]['custom_field_id'] = 'custom_' . $custom_field->id;
    $params['custom']['custom_field'.$custom_field->id]['value'] = $submission_url;
  }         
  require_once('api/v2/Activity.php');
  $activity =& civicrm_activity_create($params);

My activity is getting created but the link field on the activity is not getting populated. From debugging into CustomValueTable.php, it seems like I also need to provide the custom table name. Is there a simpler way of doing this?
Thank you,
Tara.

PS: We are still on an old version of civi so unfortunately can not use your patch.

taram

  • I post occasionally
  • **
  • Posts: 35
  • Karma: 2
Re: Activities/Details
July 21, 2010, 10:43:11 am
I got the create to work by supplying more fields (table name, column name & the type). I am not sure if it's the right way but it works.

Code: [Select]
    $params['custom']['custom_field'.$custom_field->id]['type'] = 'Link';
    $params['custom']['custom_field'.$custom_field->id]['table_name'] = $table_name;
    $params['custom']['custom_field'.$custom_field->id]['column_name'] = 'application_link';

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM (Moderator: Dave Greenberg) »
  • Activities/Details

This forum was archived on 2017-11-26.