Skip to content

ODataService DeleteEntity

DeleteEntity action is used to delete a single OData entity.

The properties defined in Action are also applicable to this action.

ODataService DeleteEntity Properties

Property Type Required
Headers object Optional
RequestOptions RequestOptions Optional
Target LinkQueryTarget Required
_Type const Required

Headers

Custom headers to be included as part of the request to the OData Service in key/value pair format

  • type: object

RequestOptions

Options for processing of data requests


Target

This action can only be executed on a single entity. therefore the Target specifier must be configured to return only 1 entity, otherwise this action will fail


_Type

  • type: const

The value of this property must be equal to:

"Action.Type.ODataService.DeleteEntity"

Action Result

Refer to the MDK Guide to understand what an action result is.

The success ActionResult of this action is a JS object containing the delete entity. The failure ActionResult is an error message.


Examples

Query Options

{
  "_Type": "Action.Type.ODataService.DeleteEntity",
  "Target": {
    "Service": "/MyMDKApp/Services/MyOData.service",
    "EntitySet": "Customers",
    "QueryOptions": "$filter=CustomerID eq {{Property:#CustomerID}}"
  }
}
{
  "_Type": "Action.Type.ODataService.DeleteEntity",
  "Target": {
    "Service": "/MyMDKApp/Services/MyOData.service",
    "EntitySet": "Customers",
    "ReadLink": "{@odata.readLink}"
  }
}