【发布时间】:2013-11-04 22:43:47
【问题描述】:
我通过客户名称调用 CustomerQuery 以获取 ID。我的代码已经工作了很长一段时间,没有任何变化。现在,它返回 IdsException 'ResponseStream was null or empty。这是我的代码:
Dim CustomerQuery as new Intuit.Ipp.Data.Qbo.CustomerQuery
CustomerQuery.Name = CustomerName
Dim qboCustomers as IEnumerable(Of Intuit.Ipp.Data.Qbo.Customer) = CustomerQuery.ExecuteQuery(of Intuit.Ipp.Data.Qbo.Customer)(context)
If qboCustomers.Count>0 then
Return qboCustomers(0).Id.Value
Else
Return ""
End If
我相信即使没有匹配,查询也不应该为空或空。我认为计数应该只是 0。或者,至少我相信它在过去是这样工作的。我错了吗?
【问题讨论】:
-
您可以尝试使用 fiddler 等工具捕获原始请求 XML,并在 ApiExplorer 中使用相同的工具,看看它是否正常工作。
-
我尝试使用数据来代替。它最初搜索的 CustomerName 是“N22222 90996-1 SARABANDA AVIATION”。从客户名称中删除 90996-1 后,它给了我 0 个客户的预期响应,而不是 ID 异常。之前的客户名称有什么问题导致它抛出错误?它不喜欢客户名称中的连字符吗?
标签: vb.net intuit-partner-platform quickbooks-online