2

在使用 SalesForce REST API 检索基本数据时,我遇到了以下错误。他们似乎遵循以下模式;我要求不存在的字段。

[{"message":"\nSELECT AnnualRevenue,CreatedDate,Id,LastActivityDate\n ^\nERROR at Row:1:Column:8\nNo such column 'AnnualRevenue' on entity 'Account'. 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.","errorCode":"INVALID_FIELD"}]

[{"message":"\nSELECT AnnualRevenue,CreatedDate,ConvertedAccountId\n ^\nERROR at Row:1:Column:8\nNo such column 'AnnualRevenue' on entity 'Lead'. 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.","errorCode":"INVALID_FIELD"}]

[{"message":"\nAccountId,Amount,CloseDate,CreatedDate,ExpectedRevenue,ForecastCategoryName\n ^\nERROR at Row:1:Column:47\nNo such column 'ExpectedRevenue' on entity 'Opportunity'. 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.","errorCode":"INVALID_FIELD"}]

但是这些字段显然存在,我可以在我的开发帐户中看到它们。某些类型的销售人员帐户(专业、开发、终极、企业等)是否可能不存在这些字段?

为了让应用程序正常工作,我从 SOQL 中删除了字段,而是使用了不同的字段,但并非所有字段都有替换。无论如何...任何见解都值得赞赏。

谢谢

4

1 回答 1

1

我对 REST API 不是很熟悉,但这对我来说听起来像是一个特权问题。您确定您使用的帐户可以看到这些字段吗?检查字段级安全性。例如,我很确定预期收入默认情况下是不可见的。

这些字段应该存在于所有版本的 Salesforce。

于 2013-11-07T04:17:58.097 回答