ODataService Draft Edit¶
DraftEdit action is used to create a new draft from an active entity in the specified OData service. This applies to Online OData only.
ODataService Draft Edit Properties¶
Property | Type | Required |
---|---|---|
Headers | object |
No |
Target | LinkQueryTarget | No |
_Type | const |
No |
Headers¶
Custom headers to be included as part of the request to the OData Service in key/value pair format
- type:
object
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: LinkQueryTarget
_Type¶
- type:
const
The value of this property must be:
"Action.Type.ODataService.DraftEnabled.Edit"
Any following options needs to be fulfilled.
Option 1¶
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.
Examples¶
Create a new draft with specified readlink from an active entity¶
{
"_Type": "Action.Type.ODataService.DraftEnabled.Edit",
"Target": {
"Service": "/MyMDKApp/Services/MyOData.service",
"EntitySet": "Customers",
"ReadLink": "{@odata.readLink}"
}
}