Sugar CRM 和用于关系的 SOAP API

发布于 2024-10-19 11:07:50 字数 142 浏览 0 评论 0原文

你好 我在 Sugar crm

  1. 应用程序
  2. 候选人

申请中有 2 个实体与候选人有关系。现在我想使用soap api将数据输入到具有候选者名称的应用程序,该名称是关系字段

请帮助

hello
I have 2 entties in sugar crm

  1. Application
  2. Candidate

Application has a relation with candidate. Now i want enter data using soap api to application with candidate name which is relational field

Please help

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

故事还在继续 2024-10-26 11:07:51

我对 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 或在 google 上搜索一些示例。

My suggestion for SugarCRM 5.5. However, based on the releationship type you defined, it might need some changes.

<?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);
?>

For more info see: http://www.sugarcrm.com/crm/support/documentation/SugarCommunityEdition or search google for some examples.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文