你好,我有 2 个实体在 Sugar crm
- 应用
- 候选人
申请与候选人有关系。现在我想使用soap api将数据输入到应用程序中,候选名称是关系字段
请帮忙
我对 SugarCRM 5.5 的建议。但是,根据您定义的关系类型,可能需要进行一些更改。
<?php
require_once 'nusoap.php';
$sugarClient = new soapclient($myUrl, true);
$response = $sugarClient->login(array('user_name' => $myUser, 'password' => md5($myPass), 'version' => '1'), 'myApp');
$sessionId = $response['id'];
$response = $sugarClient->get_entry_list($sessionId, 'Applications', 'name = '. $myValue, $myOrderBy, 0, array('id'));
$applicationId = $response['entry_list'][0]['id'];
$myCandidate = array(array('key' => $myVal1, 'key2' => $myVal2));
$response = $sugarClient->set_entry($sessionId, $myCandidate);
$candidateId = $response['id'];
$myRelation = array('module1' => 'Candidates', 'module1_id' => $candidateId, 'module2' => 'Applications', 'module2_id' => $applicationId);
$sugarClient->set_relationship($sid, $myRelation);
$sugarClient->logout($sessionId);
?>
有关更多信息,请参阅:http ://www.sugarcrm.com/crm/support/documentation/SugarCommunityEdition或搜索谷歌以获取一些示例。