12

Please support/implement the „upsert“ functionality for the OData service endpoint. (According http://docs.oasis-open.org/odata/odata/v4.0/errata02/os/complete/part1-protocol/odata-v4.0-errata02-os-part1-protocol-complete.html “11.4.4 Upsert an Entity”)


Without this feature, an OData client has to perform a GET request first, to check if the record already exists or not. Than perform a POST or PATCH/PUT. Currently, unnecessarily many requests are needed.

Category: Data Management
STATUS DETAILS
Needs Votes

Comments

S

Possible work-around would be to add an action to the specific Data entity, executing the desired "UPSERT" logic. This can be realized by adding a method called "InsertOrUpdate" to the entity. Then adding a [SysODataActionAttribute] above the method, to expose this method as an action in OData.


More info: https://docs.microsoft.com/en-us/dynamics365/unified-operations/dev-itpro/data-entities/odata


For Microsoft, an option would be to generate this type of action in a generic manour, and add this generic method to the 'Common' table. Exposing the newly create Upsert-method to all available Data entities at once.

Category: Data Management