Sugar CRM SOAP get_entry_list

I have an instance of sugarcrm and you want to get some data from it using special php code.

I use the nusoap client for this. I can get the data, but I want to select only the data of a specific identifier (record). What am I doing,

$response = $client->call('get_entry_list',array('session'=>$session_id , 'module_name'=>'itf_Apartments', 'where'=>'itf_Apartments.id=2', 'order_by'=>'','offset'=>'','select_fields'=>array('name')));

but I am not getting any results. is this any problem with my code ???

+3
source share
4 answers

sugarcrm.log , , - SQL? , - "where".

0

below is the code you need to use, and the same as in the sugarcrm examples.

$proxy = new SoapClient (' http://server.com/service/v2/soap.php?wsdl ',array('exceptions' => 0));

$session = $proxy->login(array('user_name'=> $user , 'password' => md5($pass)));


$query= " customer.id IN ( select id from customer where customer.id = '" . $id . "' and deleted = 0)";

$result= $proxy->get_entry_list($session->id , 'customer', $query ,'', 0 ,array('email', 'username','password', 'name') ,null, 1000, -1 ) ;
0
source

Source: https://habr.com/ru/post/1715602/


All Articles