#Rest API relation field filter not working

1 messages · Page 1 of 1 (latest)

coral vale
#

We have lots of relational fields and want to filter records based on that. ut when we try to filter records with relation field we get error . W e tried this tewnty cloud and self hosted solution both . Have attached screen shots for the error and query details.
We basically want to filter the relation fields . Please let us know if there is something wrong in the syntax we used.

#

As we tried this both with twenty cloud and self hosted solution and could not not resolve this and so are unable to proceed with production release because of this.
Would appreciate some quick help.

shy socket
#

@coral vale I've tested it in your workspace directly, confirming this is working using the field sellerId and not seller.id

#

On another note, this type of filtering is doable if you're from the side "many" of your relationship. For example, you can filter people based on the company they belong - using the field companyId in your filter, but it is not yet doable to filter the companies based on the people they're attached to. let me know if you have additional question!

coral vale
#

@shy socket Thanks for the inputs. Yes the filter works for sellerId in twenty cloud. But the same filter when I try in our self host env it doesn't work. I created a new field as test field in twenty cloud and our self host instance and we get the same error in both the environments. I am attaching screenshots for better understanding.

shy socket
#

@coral vale what is the true field that you need to filter please? Is the issue (for your demo) that you cannot filter using the sellerId on the selfhosted instance? Or do you need another field?

#

Acknowledging there is a need to look into the buyer2Id you shared but asking to prioritize.

coral vale
#

So let me break the issue -

  1. Currently customer object is related to opportunity object through seller and buyer fields and our automation flow breaks if we cannot filter customer object based on sellerId and buyerId both. So we need the filter to work for both fields sellerId and buyer2Id.

Current Status -
Twenty Cloud - sellerId- working, buyer2Id - not working
Self Hosted - sellerId- not working, buyer2Id - not working

  1. Should work in our self hosted environment and cloud as well but priority is self hosted.
#

@shy socket

gloomy jewel
#

the fact that sellerId works in the cloud could be related to this: #1379398545756393663 message

shy socket
#

thanks Mike and Azmat, we're looking into this (we're currently checking if this is going to be solved with the upcoming release - later today - or this needs additional work). I'll get back to you likely after the release is done to be able to debug on the newest version. (timeline well understood)

shy socket
#

answering on the front ticket !

gloomy jewel
coral vale
#

@shy socket We have found an alternative to the problem. the graphql api is able to filter for relational fields. So we are kind of unblocked as we can update our automation flows to use graphql and proceed.
So the issue is no longer a blocker for us. but do let us know about the issue and when can this be fixed.