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 Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Improving API Duplicate Checking
Pages: [1]

Author Topic: Improving API Duplicate Checking  (Read 1171 times)

Matt2000

  • I post frequently
  • ***
  • Posts: 288
  • Karma: 27
    • http://www.ninjitsuweb.com
Improving API Duplicate Checking
December 02, 2007, 06:55:35 pm
In playing with the API crm_create_contact(), I've noticed that the duplicate checking is pretty dumb as compared to the check done when entering new contacts via the User Interface.

Under the API, as far as I can tell, it's only a match if the given parameters are EXACTLY the same. "John Smith of john@here.com" does not match "Johnathan Smith of john@here.com", for example, but in the UI, simply entering a matching e-mail address throws a warning.

Is there a way to make the API dupe check behave more like the UI  ?

I'm running CiviCRM 1.9.12432.

I worked my way down through the code and tried unsetting 'strict' mode as 'true' in for the call to CRM_Contact_BAO_Query::getWhereClause  from getWhereClause() in  /CRM/Core/BAO/UFGroup.php (Line 1055) but this didn't seem to make a difference. From what I can tell, this should make the difference between an exact match and a 'LIKE' match...

(But then again, I don't really know what I'm doing inside that much code...)

Any other ideas?
Drupal/CiviCRM micro-blogging http://twitter.com/matt2000

Ninjitsu Web Development http://www.NinjitsuWeb.com/

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Improving API Duplicate Checking

This forum was archived on 2017-11-26.