I've tried to scavenge the internet for this but without any luck. I want to filter on a lookup-fields name value. According to the schema the property is a complex type of EntityReference. I have seen someone suggest (e.g. https://community.dynamics.com/crm/f/microsoft-dynamics-crm-forum/251843/odata-query-for-filter-on-basis-of-value-in-a-lookup-field-not-by-guid/702721 ) that it could be achieved using
/_odata/MyEntity/mylookupfield/Name eq 'somevalue'
Like you can using
/_odata/MyEntity/mylookupfield/Id eq guid'my-guid'
which works but I don't wont to filter by Id but rather the Name property. Is this the right way or is it even possible?
Who said anything about uniqueness? I just want to do a normal filter just like I can do on other properties. I can easily do it on the Dataverse API but this implementation seems to be completely different even though they are supposedly both OData.
Hi @Anonymous ,
Unfortunately it's impossible.
GUID ensures uniqueness.
Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.
Maybe I didn't phrase it well enough but I'm not interested in filtering by the GUID but by the Name property of the lookup field.
Hi @Anonymous ,
I assume I have a lookup column named 'crba2_test103_lookup'.
You should use '_crba2_test103_lookup_value' instead of 'crba2_test103_lookup'.
For example:
Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.