0

We are (newly) using civi to track membership in our international martial arts organization.

We have an external ID for each member to date, which I need to preserve and display in the contact summary, so we don't need to re-issue new member IDs.

Once I have the civi DB current with all existing members, moving forward we will simply assign NEW members the civiCRM ID as their member ID.

We had considered a one time re-issue of existing members a new ID based on their civiCRM ID, but this is not feasible.

1

You could do this with a database trigger. If you are using external id for the existing members you could put a trigger on civicrm_contacts after insert that would populate external_id with the internal_id. (assuming after you import the internal_id will be higher than any existing members. If not, than just add some number to get it higher).

External ID does show up on the main contact screen on the right side above phone number. If this isn't prominent enough you could use the civicrm_contact_get_displayname hook to append the id to the end of their display name.

Here is some info on that.
http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_contact_get_displayname

Also, you'll find a question or two on this in the old forum and in this stackexchange.

Note: if you add a db trigger you'll need to add it through the trigger_info hook. http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_trigger_info

0

Not sure I quite understand your question? You could use the external_id column on the civicrm contact record if the external ID is unique to the contact. If a contact could have more membership ID's you could add a custom field to the membership? I assume you know how to add custom fields, if not please check the user guide on http://book.civicrm.org/user/

0

External Identifier is visible in the same place as the CiviCRM ID at the bottom of the contact summary screen - IF one is defined. I don't believe you can record an external ID from within the UI, but only from an import (or manipulating the API).

Using the database's internal ID for membership IDs can backfire; someone incorrectly merging records can change the ID, as well as a number of other issues. It may be better to use a custom field.

  • but how to get the DB to auto generate the number? I don't want to have to try to do it manually for each member. – Ashe Higgs Aug 3 '15 at 15:59
  • That's a fair response. CiviCRM doesn't have the ability to create an auto-incrementing custom field - I think it'd be a great feature, but of course something like this would need to be funded (civicrm.org/paid-issue-queue). An easier solution that still involves writing code is an auto-incrementing extension - not as good for performance, but still more than good enough. I think you're doing it the best way you can if you're not in a position to write code. – Jon G - Megaphone Tech Aug 3 '15 at 19:52
  • 2
    External ID field is available via Edit on the Summary Screen, but I realise that is not the main issue under discussion. – petednz - fuzion Aug 3 '15 at 20:03

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.