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 Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Recording activities
Pages: [1]

Author Topic: Recording activities  (Read 2016 times)

robinhood

  • I post frequently
  • ***
  • Posts: 153
  • Karma: 6
  • CiviCRM version: 4.5.5
  • CMS version: Drupal 7.34
  • MySQL version: 5.1.56
  • PHP version: 5.3.5
Recording activities
April 27, 2009, 04:03:39 am
I need to bulk-record an activity for a list of contacts.  The problem is that when I use the "record activity for contacts" option, the activities are all recorded within the admin account, instead of showing up in the selected individuals' accounts.  The "with" field shows the person's name.

On the demo site, it works correctly.  The activities are recorded on the selected individuals accounts.  I must be doing something wrong but I don't know what it is.  How do I fix this?

And a related question -- now that I have accidentally recorded thousands of activity records in the admin account, how do I do a mass delete of activity records (instead of clicking the delete button for each one)?   ::)


Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Recording activities
April 27, 2009, 08:52:24 am
Quote from: robinhood on April 27, 2009, 04:03:39 am
On the demo site, it works correctly.  The activities are recorded on the selected individuals accounts.  I must be doing something wrong but I don't know what it is.  How do I fix this?

not sure why this works on demo and not on your servers. i'll stew on this for some time.

Quote from: robinhood on April 27, 2009, 04:03:39 am
And a related question -- now that I have accidentally recorded thousands of activity records in the admin account, how do I do a mass delete of activity records (instead of clicking the delete button for each one)?   ::)

This is a easier one to answer :) You'll need to do this via a sql script and just delete all activity records in that range. Make sure you delete the other tables associated with it also (activity_assignment, activity_target) if needed

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

robinhood

  • I post frequently
  • ***
  • Posts: 153
  • Karma: 6
  • CiviCRM version: 4.5.5
  • CMS version: Drupal 7.34
  • MySQL version: 5.1.56
  • PHP version: 5.3.5
Re: Recording activities
April 28, 2009, 03:52:09 am
It may be limited to when the custom search "Include / exclude contacts in a group or tag" is used.  Steps to reproduce in demo:

Go to Custom search --> Include/exclude groups and tags.

Include group "Newsletter subscribers" and exclude tag "major donors" (chosen at random for this test).

A list of 22 contacts is returned.

It is hard to select "all 22 contacts" as it appears greyed out at first, but then it opens up if you click around a few times.

Select "Record activity for contacts" and click "Go". 

The activity screen appears but there is this warning:

warning: Invalid argument supplied for foreach() in /var/www/drupal-6.civicrm.org/public/sites/drupal.demo.civicrm.org/modules/civicrm/packages/HTML/QuickForm/Controller.php on line 496.

Create "Activity two" as a meeting and click "save".  More warnings:

    * warning: Invalid argument supplied for foreach() in /var/www/drupal-6.civicrm.org/public/sites/drupal.demo.civicrm.org/modules/civicrm/packages/HTML/QuickForm/Controller.php on line 496.
    * warning: Invalid argument supplied for foreach() in /var/www/drupal-6.civicrm.org/public/sites/drupal.demo.civicrm.org/modules/civicrm/packages/HTML/QuickForm/Controller.php on line 496.

Text appears:  "Activity 'Activity two' has been saved. . "

Click button "Done".  Now the activity has been recorded on the "added by" account (Christian Pearce) but not in any of the 22 selected contacts.

This does not happen when using a different method to select the contacts.

Edit: Issue logged at http://issues.civicrm.org/jira/browse/CRM-4426
« Last Edit: April 28, 2009, 05:33:45 am by robinhood »

tim g.

  • I post occasionally
  • **
  • Posts: 57
  • Karma: 4
  • לחפש את אלוהים הראשון
    • Gott Milk
Re: Recording activities
August 09, 2010, 01:38:51 am
Just wanted to add this little hope in case someone runs across this problem again.

I was having a similar problem trying last week doing a bulk add of several contacts to an activity type that I added. It kept giving me the following error:

* warning: Invalid argument supplied for foreach() in /home/hecares/public_html/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php on line 496.*

This is what I did:

1) I created a new "Activity Type" call "Postal Mailing".
2) Did a search for everyone in my "Gold Donors" group.
3) selected three of them and selected "Record Activity for Contacts"
4) received that error above "warning: Invalid argument supplied for foreach() in /home/hecares/public_html/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php on line 496"

Ok so here is "the hope". I repeating several combinations of the above for over an hour trying to figure out what was happening. Even did the search on the test database which worked perfectly. ... I finally gave up and went to sleep. When I woke up the next morning I tried it again and it worked ... I had done nothing differently <sigh> :-)
* If you like any of my answers then click the little applaud link next to my picture. It kinda tickles.
“Why is it when we talk to God, we're said to be praying—but when God talks to us, we're schizophrenic?” - Lily Tomlin

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Recording activities

This forum was archived on 2017-11-26.