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) »
  • Batch update for event profile ID's?
Pages: [1]

Author Topic: Batch update for event profile ID's?  (Read 379 times)

Michael

  • I post occasionally
  • **
  • Posts: 69
  • Karma: 2
  • Isn't this just terrific?
  • CiviCRM version: 4.4.0
  • CMS version: Drupal 7.23
  • MySQL version: 5.3.19
  • PHP version: 5.5.30
Batch update for event profile ID's?
February 11, 2014, 12:51:17 pm
We have over 800 events that were created using one profile ID and we need to change the profile ID for all of them to a new one. We don't want to do this manually for each event. However, copying the old profile doesn't work, creating a new one doesn't work, there's no way to change the profile related to the events that are already created.

Is there a way to change the profile ID for all events in a batch? Any help will be very much appreciated.

Rajesh

  • I post occasionally
  • **
  • Posts: 78
  • Karma: 10
  • CiviCRM version: 4.2.x, 4.3.x, 4.4.x
  • CMS version: Drupal 7.xx, Wordpress 3.5.x - 3.6.x, Joomla 3.1
  • MySQL version: 5.5.20
  • PHP version: 5.3.10
Re: Batch update for event profile ID's?
February 12, 2014, 06:36:04 am
Hi Michael

If you have got database access, you can do it by SQL.

Example:
Below SQL will update the 'top of page' profile ID for all events to 1, where the existing profile ID used for the event is 12.

Code: [Select]
UPDATE `civicrm_uf_join` SET `uf_group_id` = 1 WHERE `uf_group_id` = 12 and `module` = 'CiviEvent' AND entity_table = 'civicrm_event' AND weight = 1;
You can modify the SQL to fit for your requirement.

Dont forget the golden rule before you perform any action straight in the database - backup, backup, backup  :)

- Rajesh

Michael

  • I post occasionally
  • **
  • Posts: 69
  • Karma: 2
  • Isn't this just terrific?
  • CiviCRM version: 4.4.0
  • CMS version: Drupal 7.23
  • MySQL version: 5.3.19
  • PHP version: 5.5.30
Re: Batch update for event profile ID's?
February 12, 2014, 07:20:30 am
Thanks very much, Rajesh. That's perfect.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Profiles (Moderator: Dave Greenberg) »
  • Batch update for event profile ID's?

This forum was archived on 2017-11-26.