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 »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • How to change the 'used for' field on a Custom fieldset from Contacts
Pages: [1]

Author Topic: How to change the 'used for' field on a Custom fieldset from Contacts  (Read 992 times)

peverist

  • I’m new here
  • *
  • Posts: 16
  • Karma: 0
    • Be The Change
  • CiviCRM version: 3.4.4
  • CMS version: Drupal 6.2
  • MySQL version: 5.1.49
  • PHP version: 5.3.3-7+squeeze3
How to change the 'used for' field on a Custom fieldset from Contacts
January 02, 2011, 11:50:32 pm
I am setting up a new CiviCRM and created a custom field set with a lot fields only to realise I set the 'Used For' field to Contacts instead of Individual - these fields don't apply to Household or Organisation. When I try to change it in the custom fieldset settings, the field is not open for update even though other custom field sets I have created using other values can be changed.
Does anyone know why the Used For field can't be changed if initially set to Contacts?
I am assuming it may be because a record using these custom fields has been created - yet I have deleted the only contact that used the new fields and it still can't be updated. 
 
Alternatively, is there an easy way to copy the fields from the existing fieldset to a new fieldset then I'll delete the original? 

Thanks
Phil

Yashodha Chaku

  • Forum Godess / God
  • Ask me questions
  • *****
  • Posts: 755
  • Karma: 57
    • CiviCRM
Re: How to change the 'used for' field on a Custom fieldset from Contacts
January 03, 2011, 12:38:07 am
peverist :
Quote
I am assuming it may be because a record using these custom fields has been created - yet I have deleted the only contact that used the new fields and it still can't be updated.

To avoid complications we do NOT allow changing of Used For field custom fields once created. Your best/safest bet is to to delete the old one and start afresh with a new custom group with the correct custom group settings.

However, you could also run the following SQL ( though not a recommended approach) :

Code: [Select]
UPDATE civicrm_custom_group SET extends = 'Individual' WHERE civicrm_custom_group.id = x
where x is the primary id of the custom group that you need to change.

HTH
-Yashodha
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • How to change the 'used for' field on a Custom fieldset from Contacts

This forum was archived on 2017-11-26.