3

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???

Star
  • 3,222
  • 5
  • 32
  • 48
Andromeda
  • 12,659
  • 20
  • 77
  • 103

4 Answers4

0

code below is what needed to be used and its same as you get in 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 ) ;
Bug
  • 2,576
  • 2
  • 21
  • 36
0

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.

jmertic
  • 2,208
  • 1
  • 13
  • 8
0

Why not use just get_entry() ?

http://www.sugarcrm.com/forums/f6/problem-soap-get_entry-call-30248/

Blake K Peterson
  • 471
  • 4
  • 14