Hi I am trying to update/delete a record in Teams entity in Webapi using its Primary Key ownerid (see here https://docs.microsoft.com/en-us/dynamics365/customer-engagement/web-api/team?view=dynamics-ce-odata-9 ) but getting the error: "Invalid EntityKey Operation performed : Entity team does not contain an attribute named ownerid". This error seems vague as ownerid is infact the primary key for Teams entity as mentioned in the entityReference link and also in the call from $metadata. The exact network call I am trying is of the type
PATCH [organization URI]/api/data/v9.0/teams(ownerid=<ValidGUIDHere) and
DELETE [organization URI]/api/data/v9.0/teams(ownerid=<ValidGUIDHere) and both are returning this error. Isn't this a bug in Microsoft WebApi implementation as ownerId is a PK? The same query works when I try to update account/contact entity i.e PATCH [organization URI]/api/data/v9.0/accounts(accountid=<ValidGUIDHere)
The request formation is same as the one used with updates/deletes through alternate keys see https://www.inogic.com/blog/2016/10/retrieve-update-and-delete-record-using-alternate-key-in-dynamics-crm-web-api/ .
*This post is locked for comments
I have the same question (0)