Sugar CRM에서 특정 리드를 업데이트하려고합니다. 이 ID의 ID를 모르므로 이메일 주소 나 이름을 사용하여 get_entry_list를 호출하여 리드 ID를 검색하려고합니다. 나는 시도조차get_entry_list API 호출의 query 매개 변수로 전자 메일을 제공하여 목록을 얻으려면 어떻게해야합니까?
'query' => "first_name = \"Bob\"",
:
'query' => "first_name LIKE \"%Bob%\"",
및
'query' => "email1 LIKE \"%[email protected]\"",
하지만 난 그냥이 결과를 얻기를 그래서 같은 이메일 주소 나 이름을 쿼리를 사용하여 지정하고 싶었 :
Database failure. Please refer to sugarcrm.log for details.
... 그리고 :(
여기에 전체 코드의 sugarcrm.log 안에는 아무 것도 없다 :
$get_entry_list_parameters = array(
//session id
'session' => $session_id,
//The name of the module from which to retrieve records
'module_name' => 'Leads',
//The SQL WHERE clause without the word "where".
'query' => "first_name = \"Bob\"",
//The SQL ORDER BY clause without the phrase "order by".
'order_by' => "",
//The record offset from which to start.
'offset' => '0',
//Optional. A list of fields to include in the results.
'select_fields' => array(
'id',
'name',
'email1',
),
'link_name_to_fields_array' => array(
),
//The maximum number of results to return.
'max_results' => '10',
//To exclude deleted records
'deleted' => '0',
//If only records marked as favorites should be returned.
'Favorites' => false,
);
$get_entry_list_result = call('get_entry_list', $get_entry_list_parameters, $url);
echo '<pre>';
print_r($get_entry_list_result);
echo '</pre>';
편집는 : 나는 REST API를
을 v4_1 사용하고는
이 davidboris에게 감사드립니다. 귀하의 예제에서했던 것처럼 쿼리에서 테이블 이름을 지정 했으므로 작동하는 것처럼 보였습니다! 'leads.email1 = \ "[email protected] \"'작품 !! –