AnsweredAssumed Answered

Custom request returns empty fields using Soap

Question asked by Anastasia Anastasia on May 12, 2014
Latest reply on Jun 2, 2016 by David Villasmil
7.0.2

Sugar Version 6.5.16 (Build1082)

Asterisk SugarCRM Connector module 2.6.0b



Simple code:
$response = $client->get_entry_list($session_id, "Users", "users_cstm.asterisk_ext_c = '".$extension."'");
But in any case, I got  $response->result_count is 0.

If I made a mistake:

$response = $client->get_entry_list($session_id, "Users", "users_cstm.asterisk_ext_c2 = '".$extension."'");
I saw next  in sugar.log
SELECT count(*) c FROM users     LEFT JOIN  users_cstm on users.id = users_cstm.id_c    and  users_cstm.id_c is null   LEFT JOIN   users jt0 on users.reports_to_id=jt0.id and jt0.deleted=0 and jt0.deleted=0   and  jt0.id is null   LEFT JOIN   calls_users jtl1 on users.id=jtl1.user_id and jtl1.deleted=0 and  jtl1.id is null   LEFT JOIN   calls jt1 on jt1.id=jtl1.call_id and jt1.deleted=0 and jt1.deleted=0   and  jt1.id is null   LEFT JOIN   meetings_users jtl2 on users.id=jtl2.user_id and jtl2.deleted=0 and  jtl2.id is null   LEFT JOIN   meetings jt2 on jt2.id=jtl2.meeting_id and jt2.deleted=0 and jt2.deleted=0   and  jt2.id is null   LEFT JOIN   accounts_users_1_c jtl3 on users.id=jtl3.accounts_users_1users_idb and jtl3.deleted=0 and  jtl3.id is null   LEFT JOIN   accounts jt3 on jt3.id=jtl3.accounts_users_1accounts_ida and jt3.deleted=0 and jt3.deleted=0   and  jt3.id is null   LEFT JOIN   securitygroups_users jtl4 on users.id=jtl4.user_id and jtl4.deleted=0 and  jtl4.id is null   LEFT JOIN   securitygroups jt4 on jt4.id=jtl4.securitygroup_id and jt4.deleted=0and jt4.deleted=0 and  jt4.id is null  where (users_cstm.asterisk_ext_c2 = '100') AND users.deleted=0: MySQL error 1054: Unknown column 'users_cstm.asterisk_ext_c2' in 'where clause'

and  users_cstm.id_c is null 

and  jt0.id is null

?????


If I made 
$response = $client->get_entry($session_id, "Users", "1");
All fields from users_cstm are empty, but in database are full.
Where is compose query? How fix it?
Plase help me.

Outcomes