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) »
  • Changing the contact subtype of a custom data group after creation
Pages: [1]

Author Topic: Changing the contact subtype of a custom data group after creation  (Read 1892 times)

CiviTeacher.com

  • I live on this forum
  • *****
  • Posts: 1282
  • Karma: 118
    • CiviTeacher
  • CiviCRM version: 3.4 - 4.5
  • CMS version: Drupal 6&7, Wordpress
  • MySQL version: 5.1 - 5.5
  • PHP version: 5.2 - 5.4
Changing the contact subtype of a custom data group after creation
November 30, 2011, 04:37:28 pm
Someone created a custom data group for "Individuals" that should really be for a contact subtype of individuals called "Artists".    The fields are blank - no data.   I don't want to have to re-create the data group entirely that would be a lot of work.

I've tried making a change to the table civicrm_custom_group

Code: [Select]
update civicrm_custom_group set extends_entity_column_value = 'Artists' where id=1;

However this just hides the data field from all contacts, including the subtype 'Artists'.   There must be another step that I am missing.   Suggestions?

Thanks
Try CiviTeacher: the online video tutorial CiviCRM learning library.

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: Changing the contact subtype of a custom data group after creation
November 30, 2011, 06:13:20 pm

1. check if extends_entity_column_value is a crtr-A delimited string (i think it is). if so, fix your update :)

2. also run: "truncate civicrm_cache" on the civicrmDB (if debug is set, u can do so by appending cacheCleanup=1 to a url)

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

CiviTeacher.com

  • I live on this forum
  • *****
  • Posts: 1282
  • Karma: 118
    • CiviTeacher
  • CiviCRM version: 3.4 - 4.5
  • CMS version: Drupal 6&7, Wordpress
  • MySQL version: 5.1 - 5.5
  • PHP version: 5.2 - 5.4
Re: Changing the contact subtype of a custom data group after creation
December 02, 2011, 10:00:33 am
I used this query  (which adds the ctrl-a) followed by a "truncate civicrm_cache" and that seems to work thanks.

Code: [Select]
UPDATE civicrm_custom_group
   SET extends_entity_column_value = CONCAT(CHAR(1), 'Artists', CHAR(1))
 WHERE id = 1
Try CiviTeacher: the online video tutorial CiviCRM learning library.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Changing the contact subtype of a custom data group after creation

This forum was archived on 2017-11-26.