0
ここに記載されている指示を使用して私のSFDC組織にログインしましたhttp://tomhayden3.com/2013/08/04/salesforce-python/。しかし、私はそれのqueryMoreの部分を実装することができません。それは何もしません。私が印刷(query_locator)すると、接尾辞-500のIDが出力されます。誰かがこのコードを見て、私が間違っていることを強調してもらえますか?Python3 + beatbox:質問に答えることができません
#!/usr/bin/env python3
import beatbox
# Connecting to SFDC
sf = beatbox._tPartnerNS
service = beatbox.Client()
service.serverUrl = 'https://test.salesforce.com/services/Soap/u/38.0'
service.login('my-username', 'my-password')
query_result = service.query("SELECT id, Name, Department FROM User")
records = query_result['records'] # dictionary of results!
total_records = query_result['size'] # full size of results
query_locator = query_result['queryLocator'] # get the mystical queryLocator
# loop through, pulling the next 500 and appending it to your records dict
while query_result['done'] is False and len(records) < total_records:
query_result = self._service.queryMore(query_locator)
query_locator = query_result['queryLocator'] # get the updated queryLocator
records = records + query_result['records'] # append to records dictionary
print(records['id']) #This should print all IDs??? But it is not.
あなたがインストールしたビートボックスのバージョンを正確に明らかにすることができますか?私はpypi/beatboxモジュールがpython3をサポートしているとは思わなかった。 – superfell
あなたはgithub.com/superfell/beatboxをインストールしたようですが、互換性のないpypi/Beatboxを持っていると仮定してコードを書いています。 – superfell
@superfellうん、提案したよ:) – r0xette