sugarcrm 6.5 CE の新規インストールで、アカウントと多対多の関係を持つカスタム モジュール「Groupes」を作成しました。
アカウントにレコードを追加し、「グループ」にレコードを追加して、それらをリンクしました。
私の目標は、REST v4 を使用して「グループ」内のレコードと関連するアカウント レコードを取得することです。
get_entry_list を使用して、次のことを試しました。
//retrieve records ----------------------------------------
$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' => "",
//The SQL ORDER BY clause without the phrase "order by".
'order_by' => "",
//The record offset from which to start.
'offset' => "0",
//Optional. The list of fields to be returned 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(
array(
'name' => 'offi1_groupes',
'value' => array(
'id',
'name',
),
),
),
//The maximum number of results to return.
'max_results' => '10000',
//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);
以下に、私が得たものを示します。ご覧のとおり、「グループ」レコードは取得されません。何がうまくいかなかったのか手がかりはありますか?
stdClass Object
(
[result_count] => 1
[total_count] => 1
[next_offset] => 1
[entry_list] => Array
(
[0] => stdClass Object
(
[id] => 671d043b-7c39-e2b8-66ee-5249d0d8c954
[module_name] => Accounts
[name_value_list] => stdClass Object
(
[id] => stdClass Object
(
[name] => id
[value] => 671d043b-7c39-e2b8-66ee-5249d0d8c954
)
[name] => stdClass Object
(
[name] => name
[value] => Pharmacie témoin
)
)
)
)
[relationship_list] => Array
(
[0] => stdClass Object
(
[link_list] => Array
(
[0] => stdClass Object
(
[name] => offi1_groupes
[records] => Array
(
)
)
)
)
)
)