Skip to content

ODataService Draft Discard

DraftDiscard action is used to delete an existing draft from an active entity in the specified OData service.

ODataService Draft Discard Properties

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


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

  • type: object


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: const

The value of this property must be equal to:


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 entity. The failure ActionResult is an error message.


Delete an existing draft from an active entity

  "_Type": "Action.Type.ODataService.DraftEnabled.Discard",
  "Target": {
    "Service": "/MyMDKApp/Services/MyOData.service",
    "EntitySet": "Customers",
    "ReadLink": "{@odata.readLink}"