AnsweredAssumed Answered

get_entry_list() method with query parameter on sugar 7 does not work

Question asked by Bhagyasrhee Desai on Jul 27, 2014
Latest reply on Jul 28, 2014 by Francesca Shiekh

My php code is as below.. Please note that I am trying to retrive all the accounts where the Accounts.name='bhagya'. The same query workes for me in SugarCRM Version 6.5 (Community edition) but in case of SugarCRM 7 it is not working when I mention query parameter. If I mention 'query'=>'' then I get all the records from the sugarcrm 7 server. It fails when I specify any filter for query parameter. I am using RestAPI - 4.1 $get_entry_list_parameters = array(

//session id

 'session' => $session_id,

 //The name of the module from which to retrieve records

 'module_name' => 'Accounts',

 //The SQL WHERE clause without the word "where".

      'query' => "Accounts.name=bhagya",
//          'query'=>'',

 //The SQL ORDER BY clause without the phrase "order by".

 'order_by' => "",

 //The record offset from which to start.

 'offset' => 0,

 //A list of fields to include in the results.

 'select_fields' => array(
      'id',
      'name',

 ),
 //A list of link names and the fields to be returned for each link name.

 'link_name_to_fields_array' => array(),

 //The maximum number of results to return.

 'max_results' => 10,

 //If deleted records should be included in results.

 'deleted' => 0,

 //If only records marked as favorites should be returned.

 'favorites' => false,
);

print_r($get_entry_list_parameters);

$get_entry_list_result = call('get_entry_list', $get_entry_list_parameters, $url);

echo '<pre>';
print_r($get_entry_list_result);
echo '</pre>';


Can some one help me on this..

Thank you.

Regards - Bhagya

Outcomes