我有一个名为“Chapter_Detail__c”的自定义对象。我正在创建一个LEAD,并且一个带有一个查找字段(link_id__c),它与“Chapter_Detail__c”映射。
如何在创建潜在客户时填充此查找字段。
$sObject = new SObject();
$fieldsToInsert = array (
'FirstName' => $name_rsform,
'LastName' => $username_rsform,
'Company' => 'TestSession',
'Full_Name__c' => $name_rsform,
'Chapter_Name__c' => $chapter_name_rsform,
'Role__c' => $role_rsform_label,
'Email__c' => $email_rsform,
'Branch_of_service__c' => $bos_f,
// 'link_id__c' => $chapter_id_rsform, - DOES NOT WORK THIS WAY ITS A LOOKUP RELATIONSHIP WITH OBJECT "Chapter_Detail__c"
);
$sObject->fields = $fieldsToInsert;
$sObject->type = 'Lead';
//echo "**** Creating the following:\r\n";
$createResponse = $mySforceConnection->create(array($sObject));
//print_r($createResponse);
echo 'Get ID after create';
$ids = array();
foreach ($createResponse as $createResult) {
print_r($createResult);
array_push($ids, $createResult->id);
}
$idRecieved = $ids[0];
任何形式的帮助将不胜感激。感谢。