Skip to main content
Solved

REST API: using $filter on a Generic Inquiry

  • 3 June 2024
  • 1 reply
  • 64 views

I following the instructions listed here:

https://www.acumatica.com/blog/contract-based-apis-in-generic-inquiries/

 

However, my Generic Inquiry is really large so I’d like to apply a filter.  However, since I created a Result set using the instructions above, I get an error when I want to filter on a Generic Inquiry value:

    "exceptionMessage": "The parent value for a property access of a property 'InventoryID' is not a single value. Property access can only be applied to a single value.",

 

I’m able to filter in the UI on the Generic Inquiry page when I click VIEW INQUIRY so it seems like I shouldn’t have followed the instructions above when creating my Web Service Endpoint.

 

Question: are there a separate set of instructions to follow when using $filter with Generic Inquiry and REST?

 

Here’s the URL I’m using:

https://sandbox.acumatica.com/entity/INStockItem/22.200.001/POReceiptPackages?$expand=Result&$filter=Result/InventoryID eq '331-0470'

1 reply

Userlevel 7
Badge +5

@bpgraves since you use PUT to get the data from a GI, the $filter expression is not supported. 

You can add the condition in the GI itself and send it in the body of the request.

Reply