【问题标题】:SalesForce API: No such column 'AnnualRevenue' on entity 'Account'SalesForce API:实体 'Account' 上没有这样的列 'AnnualRevenue'
【发布时间】:2013-11-07 01:11:24
【问题描述】:

在使用 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 中删除了字段,而是使用了不同的字段,但并非所有字段都有替换。无论如何...任何见解都值得赞赏。

谢谢

【问题讨论】:

    标签: api salesforce


    【解决方案1】:

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

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

    【讨论】:

    • 好点,我检查过了,没有运气。我用于 OAuth 的帐户是 SysAdmin 配置文件的一部分。
    • 在寻找类似问题的解决方案时遇到此问题:尝试发送新的潜在客户数据,但得到 400(JSON 响应:{ "message": "No such column 'AnnualRevenue' on sobject of type Lead", "errorCode": "INVALID_FIELD" })。我们发现字段级安全确实将AnnualRevenue 设置为隐藏,并且取消隐藏它可以解决问题。
    猜你喜欢
    • 1970-01-01
    • 2021-01-06
    • 1970-01-01
    • 1970-01-01
    • 2012-08-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-04-25
    相关资源
    最近更新 更多