-
Notifications
You must be signed in to change notification settings - Fork 201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Key not used in request #254
Comments
The only thing I can think of is that the OData service definition doesn't have the key. Can you check the service metadata (go to service_url/$metadata)? |
Yes, that was it. Thanks a lot! 👍 |
I don't know if should open a new issue or use this one. I have a scenario where the OData service (MS Dynamics 365 Customer Engagement A.K.A. CRM) I am accessing uses "alternate keys" in which the key notation is accepted but the metadata does not define them in the Key node for the entity. As a result, the Client will not use the key I define using the .Key() statement. Here are the details: The metadata:
The essence of the code:
The request:
Here is a working request that I tested:
I know there is a plan to add support for custom attributes in the next major release. However, until that time is there any possible workaround? For example, is there a way to tell the client to use the key values provided even though the Metadata doesn't appear to define them as keys? I could use the Thanks, toryb |
I have this code where I try to delete an entity:
which constructs the following Uri to the server:
https://localhost:44305/odata/Account()
instead of the expectedhttps://localhost:44305/odata/Account('foo')
. Any idea what could be the cause of this? I use Web Api to implement the Odata service.The text was updated successfully, but these errors were encountered: