簡體   English   中英

python simple_salesforce查詢全部

[英]python simple_salesforce query all

我正在使用包simple_salesforce訪問Salesforce數據。 我以這種方式查詢Salesforce中的表:

from simple_salesforce import Salesforce
sf = Salesforce(username = '', password = '', security_token = '')
sf.query("SELECT Id, Name FROM Main__c LIMIT 2000")

這工作得很好,但是如果我想查詢所有列,事情就會開始拋出錯誤。

我試過了:

sf.query("SELECT * FROM Main__c LIMIT 2000")
sf.query("SELECT All FROM Main__c LIMIT 2000")

這是錯誤:

Response content: No such column 'ALL' on entity 'Main__c'. 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."}]

我不確定如何進行。 如何完成對所有列的查詢?

Salesforce不支持SELECT * FROM Object,您必須包括要從查詢中返回的特定字段,即您在第一個查詢中所做的方式。 這里查看SOQL語法幫助頁面

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM