我在使用SalesForce时遇到了一些麻烦,我从未使用它,所以我不完全确定这里出了什么问题。我正在使用simple_salesforce
python模块。我已成功从SalesForce标准对象中提取数据,但此自定义对象给我带来麻烦。我的查询是找不到SalesForce对象
result = sf.query("Select Name from Call_Records__c")
产生这个错误:
Traceback (most recent call last):
File "simple.py", line 15, in <module>
result = sf.query("Select Name from Call_Records__c")
File "/usr/local/lib/python2.7/dist-packages/simple_salesforce/api.py", line 276, in query
_exception_handler(result)
File "/usr/local/lib/python2.7/dist-packages/simple_salesforce/api.py", line 634, in _exception_handler
raise exc_cls(result.url, result.status_code, name, response_content)
simple_salesforce.api.SalesforceMalformedRequest: Malformed request https://sandbox.company.com/services/data/v29.0/query/?q=Select+Name+from+Call_Records__c. Response content: [{u'errorCode': u'INVALID_TYPE', u'message': u"\nSelect Name from Call_Records__c\n ^\nERROR at Row:1:Column:18\nsObject type 'Call_Records__c' is not supported. If you are attempting to use a custom object, be sure to append the '__c' after the entity name.
Please reference your WSDL or the describe call for the appropriate names."}]
我一直有和没有__c
两个表名和字段名试了一下,还是不明白这一点。任何公然错误的?
您是否100%确定Call_Records是自定义对象的实体名称? –
当我登录到SF时,选项卡显示“通话记录”。我认为下划线是适当的替代空间。 – Will
不,请尝试找到自定义对象的实体名称 –