1

ビートボックスを使用してPythonからSalesforceに接続していますが、日付で制約を追加しようとするまでは正常に機能します。

CreatedDate制約を追加すると、次のように失敗します

File "/Library/Python/2.7/site-packages/beatbox/_beatbox.py", line 332, in post
    raise SoapFaultError(faultCode, faultString)
beatbox._beatbox.SoapFaultError: 'INVALID_FIELD' "INVALID_FIELD: from Assets__c where CreatedDate > 2012-08-08 ^ ERROR at Row:1:Column:1061 value of filter criterion for field 'CreatedDate' must be of type dateTime and should not be enclosed in quotes"
  • これをクエリして修正するためにdatetypeオブジェクトを送信するにはどうすればよいですか?
4

2 に答える 2

1

気付いたばかりですが、SFDCの方法で日付を入力する必要があります-2012-08-15T00:00:00+00:00

参照-http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_soql_select_dateformats.htm

于 2012-08-16T19:26:42.163 に答える
0

これにより、日時オブジェクトが提供されます。

import datetime

def return_datetime(year, month, day):
    return datetime.datetime(year, month, day)

date = return_datetime(2012, 8, 12)
于 2012-08-16T19:15:34.530 に答える