我在使用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
不,請嘗試找到自定義對象的實體名稱 –