Developer Q&A
Conditions not being used when RetrieveMultiple is used.
almost 5 years ago by Rex Posadas(edited)
Hi,
I am trying to get a list of "Open" WorkOrders. But the list I get back is not filtered to the conditions I set.
I am following this guide by using the RetrieveMultiple call:
https://developer.corrigo.com/docs/search-multiple
I am sending the following payload. The Conditions parameters is being set:
<ns0:RetrieveMultiple xmlns:ns0="http://corrigo.com/integration/">
<ns0:queryExpression xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns0:QueryByProperty">
<ns0:EntityType>WorkOrder</ns0:EntityType>
<ns0:PropertySet xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns0:AllProperties"/>
<ns0:Count>10</ns0:Count>
<ns0:FirstResultIndex>3</ns0:FirstResultIndex>
<ns0:Conditions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns0:PropertyValuePair">
<ns0:PropertyName>StatusId</ns0:PropertyName>
<ns0:Value>Open</ns0:Value>
</ns0:Conditions>
</ns0:queryExpression>
</ns0:RetrieveMultiple>
What modifications do I need to make to my call in order to get only "Open" WorkOrders? Currently, I get WorkOrders of any status back in the response.