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

The ActionResult of this action is a JS object containing the deleted entity.


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}"
  }
}