Skip to main content

How could I use OData in function in $filter query ?

  • Apr 25, 2024 10:59 PM UTC
  • 3 replies
  • 483 views
  • Translate All

Hi @ruchikasharma23 @Laura02 , hope you’re well guys,

 

Could you please refer or help me, how I could use OData in function in $filter query ?

here is my query Customer?%24filter=CustomerID%20in%20(%270000003%27%2C%20%270000004%27%2C%20%270004737%27)' and it always produced this error message"Syntax error at position 13 in 'CustomerID in ('0000003', '0000004', '0004737')'.", I know I could use this approach such as  $filter=CustomerID eq '0000003' or CustomerID eq '0000004' or CustomerID eq '0004737', but in case the ids list will be long it’s definitely the best approach to use “IN” list function. Please help me with. Thanks in advance.

3 replies

Forum|alt.badge.img+3

@OzVerum 

 

Translate

  • Author
  • Freshman I
  • Apr 28, 2024 8:23 PM UTC

Hi @ruchikasharma23 ,

 

Thank you for this clarification, and nope, I need a filter for IDs list, but that’s good I will continue use “OR” for this, probably they will add this feature in the future release, it will be really handy to have it. ))

 

 

Translate

  • Author
  • Freshman I
  • May 5, 2024 11:02 PM UTC

 Hi @ruchikasharma23 ,

 

Could you please help me with invoices, how could I get OrderNbr in the call API invoice? I tried to $expand Details, but it provides data for inventory items those are related Sales Order, but not the Order number as well, or any hint how could I link Invoices with SalesOrders all together?

 

Thank you in advance. 

Translate