Reputation: 12897
I have sugarcrm instance and want to fetch some data from it using a custom php code.
I am using nusoap client for this. I am able fetch the data but want to select data of particular id(record) only. what i am doing is
$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 iam not getting any results. is ther any problem with my code???
Upvotes: 3
Views: 6270
Reputation: 1
code below is what needed to be used and its same as you get in sugarcrm examples.
$proxy = new Soap
Client('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 ) ;
Upvotes: 0
Reputation: 481
Why not use just get_entry() ?
http://www.sugarcrm.com/forums/f6/problem-soap-get_entry-call-30248/
Upvotes: 0
Reputation: 2208
Can you look at the sugarcrm.log file for the instance to see if there are any SQL errors in it? I'm betting the issue has something to do with the 'where' parameter.
Upvotes: 0