diff --git a/node.js/fiori.md b/node.js/fiori.md index 0e60abe31..229325e72 100644 --- a/node.js/fiori.md +++ b/node.js/fiori.md @@ -174,3 +174,15 @@ You can set the property to one of the following: - Draft-related properties (with the exception of `IsActiveEntity`) are only computed for the target entity, not for expanded sub entities since this is not required by Fiori Elements. - Manual filtering on draft-related properties is not allowed, only certain draft scenarios are supported. + +### Programmatic Invocation of Draft Actions + +You can programmatically invoke draft actions with the following APIs: + +```js +await srv.new(MyEntity, data) // create new draft +await srv.discard(MyEntity.drafts, keys) // discard draft +await srv.edit(MyEntity, keys) // create draft from active instance +await srv.new(MyEntity).for(keys) // same as above +await srv.save(MyEntity.drafts, keys) // activate draft +```