3

I have an existing field for the donor name to show in printed materials. It was set up just for Individuals. The Custom Group has only this one field in it. Several reports/profiles/templates already use this field. I also want this same field available for households. If household data (or organization data) is pulled, I'd like to be able to have this field available, and I'd like to be able to update it. Table: civicrm_custom_group shows the help text for the column in question as: extends Type of object this group extends (can add other options later e.g. contact_address, etc.). Individual is the value currently. Can it hold more than one type? Can it be changed? Is there a way to have the same custom field for more than one type of entity?

1

An old question, but an answer might still be useful to someone ...

If you had set the Custom Group to extend 'Contact' then it would be available for Individuals, Households and Organisations. But you can't change the extends (Used for) setting via the GUI after creation.

Two options:

1) Create a new Custom Group used for Contacts. Then:

  • go to the old Custom Group, View and Edit Custom Fields,
  • on the relevant field click More then Move
  • select the new Custom Group.

2) Modify the extends parameter via the API. For example, use the API explorer:

  • set Entity to CustomGroup
  • set Action to get
  • Execute
  • find the right Custom Group and note it's id
  • change Action to create
  • change Parameter to Custom Group ID = the id you just found
  • add Parameter, Custom Group Extends = Contact
  • Execute

Be aware that the API lets you do things that the GUI does not, and it is possible to break your system in nasty ways with it. Just because the API lets you change something doesn't mean you should!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.