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) »
  • Changing contact sub-type through GUI
Pages: [1]

Author Topic: Changing contact sub-type through GUI  (Read 2576 times)

Durruti

  • I post occasionally
  • **
  • Posts: 49
  • Karma: 1
    • The Kindling Trust
  • CiviCRM version: 3.4
  • CMS version: Drupal 6.20
  • MySQL version: 5.0.77
  • PHP version: 5.2.17
Changing contact sub-type through GUI
February 09, 2010, 06:50:06 am
Hello all,

I am currently running two websites using civicrm 3.1.1 and I'm making good use of the new contact sub-type option. On the first site I'm running I have the option of change the sub-type (currently organization to) one of the new sub-types, however in the second site no such option exists. In the first the option exists next to the SIC Code field. As far as I can tell I've set both databases up in exactly the same way. Is there a setting somewhere that I'm missing.

Many thanks for any tips,
Durruti
http://feedingmanchester.org.uk

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Changing contact sub-type through GUI
February 09, 2010, 09:29:57 am
If you see the Contact Type listed - but not editable - in the 2nd site, one possible reason is that you have custom data saved for that organization(s). Once you've saved a record with custom field data, we don't allow you to change the type since the custom data associated with other subtypes might be different.
Protect your investment in CiviCRM by  becoming a Member!

Durruti

  • I post occasionally
  • **
  • Posts: 49
  • Karma: 1
    • The Kindling Trust
  • CiviCRM version: 3.4
  • CMS version: Drupal 6.20
  • MySQL version: 5.0.77
  • PHP version: 5.2.17
Re: Changing contact sub-type through GUI
February 10, 2010, 09:54:58 am
Thanks for the reply Dave!
I don't see the content type listed, but I think the existing custom data may be the problem. I'd assumed that as I was dealing with sub-types of 'organization' the custom data for organization would be OK, but I understand the logic of hiding the option to change it.

So, here is what I did to try to sort the problem

  • Backed up my database.
  • Disabled all the 'organization' specific custom groups,
  • In civicrm_custom_groups' I changed the 'extends_entity_column_value' of the groups to reflect the new contact sub-type
  • truncate civicrm_cache ; truncate civicrm_acl_cache;

Now when I create of new contact with the new contact sub-type I see all the custom fields transferred over, but I'm still not able to change the contact type of existing records. Is this something I can do manually through phpmyadmin.

Many thanks again,

Durruti
http://feedingmanchester.org.uk

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Changing contact sub-type through GUI
February 10, 2010, 02:25:59 pm
You can change the contact type of those existing records manually - contact_type and contact_sub_type store these as strings. However, I'm pretty sure that the reason you can't change them in the UI is that linked custom data exists for these records in one or more custom data tables (civicrm_value_* tables). Not sure what effect modifying the sub_type manually would have on those 'child rows'.

I would try these modifications on a copy of the DB if this is production data - and consider doing export / import to fix the problem.
Protect your investment in CiviCRM by  becoming a Member!

palmquist

  • I post occasionally
  • **
  • Posts: 34
  • Karma: 2
  • CiviCRM version: 4.5.6
  • CMS version: Drupal 7.26
  • MySQL version: 5.5.36-log
  • PHP version: 5.4.24
Re: Changing contact sub-type through GUI
January 02, 2011, 04:30:09 pm
I know this is an old topic, but I just found a solution and so I thought I would post this for any who come here by searching:

Changing contact types can be accomplished fairly easily through a duplicate contact merge.

For example, if you have an existing "Individual" contact "Jones, Bill" whose email address is "bill@jones.com" and want to change him to a "Client" (assuming that "Client" is a sub-type of "Individual"):

Go to Contacts -> New Individual -> New Client

Enter first name "Bill", last name "Jones", and any other "Client" information you need.  Save the record. 

If you don't immediately see an option to merge the new "Client" record with the old "Individual" record, edit the "Client" record by adding the email address "bill@jones.com" if you haven't already done so.   (Depending upon your dedupe rules, you may need to put duplicate information in additional fields as required by your rules.)  Then click "Check for Matching Contact(s)" or "Save".

The merge screen should now appear.  Go through the usual merge procedure, being sure that the "Client" record is selected as the "original" and the "Individual" record is the "duplicate."

When the merge is done, your "Individual" record for Bill Jones will be gone, and in its place will be a "Client" record for Bill Jones.

(The above procedure worked for me on CiviCRM 3.3.1.)

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Changing contact sub-type through GUI

This forum was archived on 2017-11-26.