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 do I make make Home fields Primary?
Pages: [1]

Author Topic: How do I make make Home fields Primary?  (Read 1229 times)

jenred

  • I post occasionally
  • **
  • Posts: 31
  • Karma: 0
How do I make make Home fields Primary?
April 28, 2009, 09:13:06 am
For some reason when I created a profile I managed to use home address fields instead of primary.

Also, shouldn't the default behavior be if only 1 record = primary?

How do I make these fields primary so they are picked up by the pre-set searches and more.

Thanks,
Jen

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: How do I make make Home fields Primary?
April 28, 2009, 12:19:07 pm
Try setting the "Home" location type to be the default location type under Administer CiviCRM >> Option Lists >> Location Types.

Going forward (for 2.3) we are planning on simplifying the address model a bit - and will make sure that if a contact only has one address (or email or phone) that it will be considered primary w/o any other steps needed.
Protect your investment in CiviCRM by  becoming a Member!

jenred

  • I post occasionally
  • **
  • Posts: 31
  • Karma: 0
Re: How do I make make Home fields Primary?
April 28, 2009, 01:49:19 pm
Alas, home is already set to default.  I'll try and narrow things done further.

Thanks,
Jen

jenred

  • I post occasionally
  • **
  • Posts: 31
  • Karma: 0
Re: How do I make make Home fields Primary?
April 28, 2009, 02:44:30 pm
It looks like since these were contacts coming in via CiviEvent registration their primary contact is set as "billing."

Any ideas on how to:

1) Change this behavior in civievent

2) Mass update all the existing contacts to make their primary contact "home."

I'm open to a mass update at the DB level...

Thanks,
Jen

jenred

  • I post occasionally
  • **
  • Posts: 31
  • Karma: 0
Re: How do I make make Home fields Primary?
April 28, 2009, 03:08:30 pm
And to make this issue even more fun!

The primary email addresses are recorded as "billing" therefore if  I switch the individual records to home as their primary record, I lose the email information in the preset searches, unless I copy the billing email into the home email field.

Anyway to mass duplicate billing data to home and home data to billing?

Thanks,
Jen

jenred

  • I post occasionally
  • **
  • Posts: 31
  • Karma: 0
Re: How do I make make Home fields Primary?
April 28, 2009, 04:27:38 pm
Ok here is the sql I used to update the records in case anyone else runs into this problem:

Code: [Select]
mysql> update civicrm_address set is_primary = false where location_type_id = 5;
mysql> update civicrm_address set is_primary = true where location_type_id = 1;

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • How do I make make Home fields Primary?

This forum was archived on 2017-11-26.