Skip to content

ODataService DeleteEntity

DeleteEntity action is used to delete a single OData entity.

All the properties defined under Action are applicable to this action.

ODataService DeleteEntity Properties

Property Type Required
Headers object No
RequestOptions RequestOptions No
Target LinkQueryTarget Yes
_Type const Yes

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:

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