我试图在使用休息创建会议和分配联系人之间设置关系,以下是我的代码..会议已成功插入但我不知道为什么分配的联系人未保存到meetings_contacts表
$login_parameters = array(
"user_auth"=>array(
"user_name"=>'rocks',
"password"=>md5('rocks'),
"version"=>"1"
),
"application_name"=>"VanareClient",
"name_value_list"=>array(),
);
$data = call("login", $login_parameters, $url);
$set_contact_parameters = array (
'session' => $data->id,
'module_name' => 'Meetings',
'name_value_list' => array( array (
"name" => "name",
"value" => "Subject"
),
array (
"name" => "description",
"value" => "description"
),
array (
"name" => "location",
"value" => "Pune"
),
array (
"name" => "duration_hours",
"value" =>"1"
),
) );
$dataMeeting = call ( "set_entry", $set_contact_parameters, $url );
$parameters = array(
'session' => $data->id,
'module_name' => 'Meetings',
'module_id' => $dataMeeting->id,
'link_field_name' => 'meetings_contacts',
'related_ids ' => array('25627846-a8a2-eeb5-3565-532035113842'),
);
$dataContactMeetings = call ( "set_relationship", $parameters, $url );
这就是我正在尝试的...请帮助我如何将会议和联系人的关系插入到meeting_contacts mysql表中。我正在使用Sugarcrm CE 6.5.16版本。
答案 0 :(得分:-1)
尝试
'link_field_name' => 'contacts',
因为链接字段名称是“contacts”(关系名称是'meetings_contacts')。