令人困惑的SalesForce错误

问题描述:

我正在使用SalesForce PHP工具包并获得连接。但是,当我使用任何的示例代码 - 看here令人困惑的SalesForce错误

INVALID_FIELD: No such column '' on entity 'Contact'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names. 

我可能只是在努力寻找答案,因为谷歌将不会让我搜索“”

环境是CentOS 6的用PHP 5.3。

+0

您只需使用单词'quote'或'double quote'搜索 – Asciiom

+0

@JeroenMoons感谢您的评论 - 但结果似乎相同。 – meefojoe

+0

你有没有额外的逗号?我不使用PHP工具包,但我只是猜测.. –

我刚刚在这里创建了一个帐户来回答这个问题。我花了整天的时间来找出PHP Toolkit中的这个错误。问题是由“fieldsToNull”属性造成的。我读了约。解决方案here,给了我一个想法在哪里寻找解决方案。

因此,一个正确的例子是:

$fields = array('LastName' => 'Doe'); 
$sObject = new SObject(); 
$sObject->fields = $fields; 
$sObject->fieldsToNull = NULL;//this is the solution! :)  
$sObject->type = 'Contact'; 

然后,继续照常与的PHP工具包的实施例的剩余部分。它可以与我的合作伙伴WSDL + Developer SF帐户一起工作。

希望它有帮助!