我在Salesforce中的Order对象上有一个基本的SELECT查询,该查询是从Mule中的Salesforce连接器调用的。该查询是使用Salesforce连接器中的数据集查询生成器生成的,但我一直收到错误“解析并获取查询元数据失败”,当我尝试编辑查询时,我看到以下错误信息框< strong>“*格式错误的DataSense查询语言表达式。请检查您的查询”
我很困惑为什么会发生这种情况,因为查询是使用查询生成器而不是手动构建的,如果我在Salesforce中为Account对象创建查询,我不会收到错误,所以不确定订单何时会给我错误。
有谁知道导致订单查询失败的原因是什么?
我还发现,当我切换到Native Query Language而不是Datasense Query Builder时,它最初工作,但后来开始返回图形错误。
简单的骡流,给我同样的错误:
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" xmlns:sfdc="http://www.mulesoft.org/schema/mule/sfdc" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:apikit="http://www.mulesoft.org/schema/mule/apikit" xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns:spring="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/apikit http://www.mulesoft.org/schema/mule/apikit/current/mule-apikit.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.mulesoft.org/schema/mule/sfdc http://www.mulesoft.org/schema/mule/sfdc/current/mule-sfdc.xsd">
<http:listener-config name="myTest-httpListenerConfig" host="0.0.0.0" port="8081" doc:name="HTTP Listener Configuration"/>
<apikit:config name="myTest-config" raml="myTest.raml" consoleEnabled="true" consolePath="console" doc:name="Router"/>
<sfdc:config name="Salesforce__Basic_Authentication" username="${sf.user}" password="${sf.pwd}" securityToken="${sf.token}" doc:name="Salesforce: Basic Authentication"/>
<flow name="myTest-main">
<http:listener config-ref="myTest-httpListenerConfig" path="/api/*" doc:name="HTTP"/>
<apikit:router config-ref="myTest-config" doc:name="APIkit Router"/>
<exception-strategy ref="myTest-apiKitGlobalExceptionMapping" doc:name="Reference Exception Strategy"/>
</flow>
<flow name="get:/orders:myTest-config">
<sfdc:query config-ref="Salesforce__Basic_Authentication" query="dsql:SELECT Id FROM Order" doc:name="Salesforce"/>
</flow>
<apikit:mapping-exception-strategy name="myTest-apiKitGlobalExceptionMapping">
<apikit:mapping statusCode="404">
<apikit:exception value="org.mule.module.apikit.exception.NotFoundException" />
<set-property propertyName="Content-Type" value="application/json" doc:name="Property"/>
<set-payload value="{ "message": "Resource not found" }" doc:name="Set Payload"/>
</apikit:mapping>
<apikit:mapping statusCode="405">
<apikit:exception value="org.mule.module.apikit.exception.MethodNotAllowedException" />
<set-property propertyName="Content-Type" value="application/json" doc:name="Property"/>
<set-payload value="{ "message": "Method not allowed" }" doc:name="Set Payload"/>
</apikit:mapping>
<apikit:mapping statusCode="415">
<apikit:exception value="org.mule.module.apikit.exception.UnsupportedMediaTypeException" />
<set-property propertyName="Content-Type" value="application/json" doc:name="Property"/>
<set-payload value="{ "message": "Unsupported media type" }" doc:name="Set Payload"/>
</apikit:mapping>
<apikit:mapping statusCode="406">
<apikit:exception value="org.mule.module.apikit.exception.NotAcceptableException" />
<set-property propertyName="Content-Type" value="application/json" doc:name="Property"/>
<set-payload value="{ "message": "Not acceptable" }" doc:name="Set Payload"/>
</apikit:mapping>
<apikit:mapping statusCode="400">
<apikit:exception value="org.mule.module.apikit.exception.BadRequestException" />
<set-property propertyName="Content-Type" value="application/json" doc:name="Property"/>
<set-payload value="{ "message": "Bad request" }" doc:name="Set Payload"/>
</apikit:mapping>
</apikit:mapping-exception-strategy>
</mule>
感谢您的帮助