使用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"}]
但这些字段显然存在,我可以在我的Dev帐户中看到它们。对于某些类型的SalesForce帐户(Professional,Dev,Ultimate,Enterprise等),这些字段是否可能不存在?
为了使应用程序正常工作,我从SOQL中删除了字段,而是使用了不同的字段,但并非所有字段都有替换。无论如何......任何见解都值得赞赏。
由于
答案 0 :(得分:1)
我对REST API并不是很熟悉,但这听起来像是一个特权问题。您确定您使用的帐户可以看到这些字段吗?检查现场级安全性。我很确定,例如,预期收入在默认情况下是不可见的。
Salesforce的所有版本都应该存在这些字段。