有人可以使用sugarcrm API/nusoap提供一个示例代码块来添加创建账户吗?然后将潜在客户链接到帐户?
我有一个添加潜在客户的示例函数,我可以看到如何创建帐户,但我看不到如何将潜在客户绑定到帐户,以模拟 Sugarcrm 帐户/子面板流程中的子面板流程。
谢谢
// Create a new Lead, return the SOAP result
function createLead($data)
{
// Parse the data and store it into a name/value list
// which will then pe passed on to Sugar via SOAP
$name_value_list = array();
foreach($data as $key => $value)
array_push($name_value_list, array('name' => $key, 'value' => $value));
// Fire the set_entry call to the Leads module
$result = $this->soap->call('set_entry', array(
'session' => $this->session,
'module_name' => 'Leads',
'name_value_list' => $name_value_list
));
return $result;
}
$result = $sugar->createLead(array(
'lead_source' => 'Web Site',
'lead_source_description' => 'Inquiry form on the website',
'lead_status' => 'New',
'first_name' => $_POST['first_name'],
'last_name' => $_POST['last_name'],
'email1' => $_POST['email'],
'description' => $_POST['message']
));