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 Profiles (Moderator: Dave Greenberg) »
  • Current Employer on event profiles - bad idea
Pages: [1]

Author Topic: Current Employer on event profiles - bad idea  (Read 611 times)

civicrmsav

  • I post frequently
  • ***
  • Posts: 121
  • Karma: 5
  • CiviCRM version: 4.2.6
  • CMS version: Drupal 7.x
Current Employer on event profiles - bad idea
February 28, 2011, 09:27:23 am
I'm just reporting something I just discovered the hard way about using the Current Employer field on profiles.    If someone else has an alternative/better approach, I'd love to know it, and if not, maybe I'll save someone else some pain.

I have a database where membership cascades down to employees.  So if the employer is the member, the employees of that member inherit their memberships.   

When people register for events, I had placed the "Current Employer" field on the profile.  This turns out to be a terrible idea, because the user frequently types their company name slightly differently than what was already in the database.  So for example they had been John Smith at  MyWorld Inc.  in the database, but when they registered for they event they typed My World, Inc.   The system sees this (reasonably) as a new organization and creates a new organization contact,  associates John with it, disables John's original relationship and eliminates John's membership.  (again reasonable from the system's point of view that this is a new organization).

I've hacked around this for now by creating a custom field "Organization as Entered" and placing that on the profile instead of Current Employer.  Now, so long as the system sees the person as a duplicate (fn/ln/email for example) it wont mess with the current employer field or the relationships and all is well.   

There are a couple of problems with this, in that (1) new registrants (not previously in the database) don't get a current employer, and (2) it is possible that someone would get a new employer, but not change their email, in which case our database would be confused, but for now that's the easiest work around I see.   

There is also some bug deep in the system somewhere, because in some, but not all, cases every other individual who was an employee of the registrant's organization would also lose their membership, and I'd have to edit the membership to get the system to re-populate the inherited memberships.    This happened multiple times on my own system, but I could not easily duplicate this on the test site, and it wasn't happening in every case on my system (and it didn't match with the "can view and update information" setting which was my first thought).   I'm not going to hunt any further for this, since presumably my work around is going to moot this point, but just including it in case someone else comes up against this.

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: Current Employer on event profiles - bad idea
March 10, 2011, 08:58:40 am
The only way to reliably get "current employer" for the end user is to make it an Autocomplete field using jQuery and lock down the form accesibility to those who are logged in and have the "Access CiviCRM" permission.  I did this once, and it's worked pretty well, but again, you don't want to expose your database to the anonymous public, only to users.

Try CiviTeacher: the online video tutorial CiviCRM learning library.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Profiles (Moderator: Dave Greenberg) »
  • Current Employer on event profiles - bad idea

This forum was archived on 2017-11-26.