Reputation: 51
I am calling CustomerQuery by customer name in order to get the Id. My code has been working for quite some time without any change. Now, it is returning the IdsException 'ResponseStream was null or empty.' Here is my code:
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
I believe the query should not be null or empty even if there is no match. I think the count should just be 0. Or, at least I believe it worked that way in the past. Am I wrong?
Upvotes: 0
Views: 242
Reputation: 2367
Special chars in queries causes exception. You need to handle them first. Please see this solution for escaping special chars while querying in V3 services- https://gist.github.com/IntuitDeveloperRelations/6582149
Upvotes: 1