我正在尝试为特定客户查询作业,但遇到了一个小问题。似乎ParentRef不可查询:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<IntuitResponse xmlns="http://schema.intuit.com/finance/v3" time="2014-02-19T10:20:31.635-08:00">
<Fault type="ValidationFault">
<Error code="4001">
<Message>Invalid query</Message>
<Detail>QueryValidationError: property 'ParentRef' is not queryable</Detail>
</Error>
</Fault>
</IntuitResponse>
但是,这是我唯一能想到的限制服务器端查询的方法。在旧世界中,我们向Jobs API提交了CustomerId :EQUALS: #{id}
过滤器,但现在已合并了Customer / Job API。我的v3查询是SELECT * FROM Customer WHERE Job = true AND ParentRef = '#{id}'
,这似乎是一件合理的事情。
我错过了什么吗?你能让我们在ParentRef上查询吗?
答案 0 :(得分:2)
这样的工作正常:
SELECT * FROM Customer WHERE FullyQualifiedName LIKE 'Your Customer Name:%'
答案 1 :(得分:0)
如果您只有一个级别,则上述工作。尝试演员:
if (null != cust.ParentRef && ((ReferenceType)cust.ParentRef).Value == c.Id)
然后,如果您正在构建一个树视图,例如将其包装在递归方法中。