我正在尝试在Salesforce Enterprise中创建记录,但收到错误消息。
代码:
<?php
define("SOAP_CLIENT_BASEDIR", "soapclient");
require_once (SOAP_CLIENT_BASEDIR.'/SforceEnterpriseClient.php');
require_once ('userAuth.php');
try {
$mySforceConnection = new SforceEnterpriseClient();
$mySoapClient = $mySforceConnection->createConnection(SOAP_CLIENT_BASEDIR.'/enterprise.wsdl.xml');
$mylogin = $mySforceConnection->login($USERNAME, $PASSWORD);
$sObject1 = new stdclass();
$sObject1->number__c = '20';
$sObject1->name__c = 'testupdateCity';
$sObject1->country__c = 'US';
$response = $mySforceConnection->update(array ($sObject1), 'nisaion_01__c');
print_r($response);
} catch (Exception $e) {
print_r($mySforceConnection->getLastRequest());
echo $e->faultstring;
}
?>
错误:
数组([0] =&gt; stdClass对象([errors] =&gt;数组([0] =&gt; stdClass对象([消息] =&gt;未在更新调用中指定的ID [statusCode] =&gt; MISSING_ARGUMENT))[id] =&gt; [成功] =&gt;))
我做错了什么?