3CX V20 MsSQL Search Contacts

Status
Not open for further replies.

LibertyX

Bronze Partner
Advanced Certified
Joined
Jan 9, 2020
Messages
14
Reaction score
0
I have configured the Connection to our SQL Server and the "Lookup By Number" is working but the Search Contacts not.
The Test Funktion on the Admin Panel does only works for the Lookup by Number.

I know that there was a Tool for Windows to test the SQL Lookup but i can not find it.
 
What variable did you use for the search contacts query? It should he the "[SearchText]"
 
Sure, for Search Contacts i use '%[SearchText]%' instead of '%[Number]%'

Lookup by Number
Code:
SELECT ID as contactid, COMPANY1 as CompanyName, FIRSTNAME0 as firstname, LASTNAME0 as lastname, EMAIL0 as email, PHONE0 as phonebusiness, MOBILEPHONE0 as phonemobile, FAX0 as faxbusiness FROM ADDRESSES WHERE PHONE0 LIKE '%[Number]%' or DIRECTPHONE0 LIKE '%[Number]%' or MOBILEPHONE0 LIKE '%[Number]%'

Search Contacs
Code:
SELECT id as COMPANY1, FIRSTNAME0 as firstname, LASTNAME0 as lastname, EMAIL0 as email, DIRECTPHONE0 as phonebusiness, MOBILEPHONE0 as phonemobile, FAX0 as faxbusiness FROM ADDRESSES WHERE FIRSTNAME0 LIKE '%[SearchText]%' or LASTNAME0 LIKE '%[SearchText]%' or DIRECTPHONE0 LIKE '%[SearchText]%' or MOBILEPHONE0 like '%[SearchText]%' or FAX0 LIKE '%[SearchText]%'
 
Status
Not open for further replies.