RussellJuma / PySuiteCRM

MIT License
10 stars 4 forks source link

Fails for email address look up? #7

Closed LittleDuke closed 1 year ago

LittleDuke commented 1 year ago

suitecrm.log is showing errors like

MySQL error 1054: Unknown column 'contacts.email' in 'where clause'

LittleDuke commented 1 year ago

UPDATE : evidently if i use "email1" that works

LittleDuke commented 1 year ago

Oddly enough though, now its returning MULTIPLE copies of the exact same record -- even through there is only ONE contact in our system with a given email address

Also this error is in the suitecrm.log file:

Query Failed: SELECT COUNT(*) AS cnt FROM contacts WHERE (contacts.email1 = 'email@address.com') AND contacts.deleted = '0': MySQL error 1054: Unknown column 'contacts.email1' in 'where clause'

LittleDuke commented 1 year ago

Getting same behavior if I try using the NATIVE API

url = "https://" + host + "/Api/V8/module/Contacts?filter[email1][eq]=email@address.com"

Getting multiple records even through the ID returned is identical - must be something about the way emails are mapped in ...

LittleDuke commented 1 year ago

Okay I found the underlying problem and reported it here:

https://community.suitecrm.com/t/api-returning-duplicate-records-on-email1-filter/88399