问题描述
我正在执行 salesforce 查询,以使用 apache camel 根据对字段 ID
和 CreatedDate
施加的条件来获取某些记录.这是 toD
语句
I am doing a salesforce query to fetch certain records based on conditions imposed on the field ID
and CreatedDate
using apache camel. This is the toD
statement
.toD("salesforce:query?sObjectQuery=Select Id, Name, CreatedDate from Account where Id > '' and CreatedDate > 2019-01-03T12:12:27.000+0000 order by CreatedDate, Id limit 10&rawPayload=true")
这将返回此错误响应
org.apache.camel.component.salesforce.api.SalesforceException: {errors:[{"errorCode":"MALFORMED_QUERY","message":"\nCreatedDate > 2019-01-03T12:12:27.0000000 order by CreatedDate, Id limit\n ^\nERROR at Row:1:Column:101\nline 1:101 no viable alternative at character ' '","fields":null}],statusCode:400}
看起来它忽略了创建日期中的 +
.我该如何解决这个问题?
Looks like it is ignoring the +
in the Created Date. How do I solve this problem?
推荐答案
预计日期 &日期时间格式在这里:https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_select_dateformats.htm
Expected date & Datetime formats are here: https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_select_dateformats.htm
不接受毫秒的点,如果您不需要时区 - 用+"删除部分也.祖鲁语时间最接近你所拥有的时间,请选择 2019-01-03T12:12:27Z 吗?
Dot for milliseconds is not accepted and if you don't need timezone - drop the part with "+" too. Zulu time is closest to what you have, go with 2019-01-03T12:12:27Z ?
这篇关于如何使用与字段 CreatedDate 相关的 apache camel 进行 Salesforce 查询?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!