Hello community!
I'm trying to filter contacts by unique keys from another system.
Currently, we are using 'eq' and 'or', but that has a limitation (the error states that only 100 nodes are supported in a filter).
After reading the oData 4.01 documentation that is linked in the creatio documentation here https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platform/architecture/development-in-creatio/integrations#title-2088-10, I found the "in" operator, which might bypass this issue completely, so we wouldn't need to page through records.
However, I couldn't get it to run...my filter looks like this:
$filter=["QsTbisKey"] in ["47928","50447"]
But it returns an error:
{ "error": { "code": "", "message": "An error has occurred.", "innererror": { "message": "The 'ObjectContent`1' type failed to serialize the response body for content type 'application/json; odata.metadata=none'.", "type": "", "stacktrace": "", "internalexception": { "message": "Object reference not set to an instance of an object.", "type": "", "stacktrace": "" } } } }
I tried using all combinations of other brackets and single quotes but was unsuccessful.
Does anyone know how to do this?
Thanks and BR,
Robert
Like
Correct filter for In operator OData 4.01 is:
filter=Id in ('6f2efedd-9b25-43b4-9cb9-0ebe60a02a8a','72509ae9-7065-465c-b7c5-3d193b8fe768')
However, it produces the same result with Creatio OData. It's possible Creatio only implements OData 4.0 and not 4.01 (which introduced the In operator).
Might need a different approach like a configuration service that takes the like of values as a param and returns the results? Or if it would work to create a common parent record of the values that could be used to retrieve the results?